Flappy bird tutorial | No matching constructor (unique pointer)

  • Hornet
    Likes 0

    Problem Description
     

    Good afternoon !

    First of all, thank you a lot for all your videos with SFML, you’re really helping a lot (and I’m looking forward to learning other things with your videos once I’m done with this project)

    I’m trying to build the state machine with the tuto and I’m getting errors due to the unique pointer but I can’t figure out why it occurs, as I tried to compile with the code on github after testing mine but got exactly the same error which is : 

    In file included from state_machine.cpp:1:
    In file included from ./state_machine.hpp:4:
    /Library/Developer/CommandLineTools/usr/include/c++/v1/memory:1574:36: error: no matching
          constructor for initialization of 'std::__1::unique_ptr<kg::State,
          std::__1::default_delete<kg::State> >'
                    ::new ((void*)__p) _Tp(__a0);
                                       ^   ~~~~

     

    I’m writing on a text editor and compiled it with a simple makefile (lines of compiling if it’s linked with the errors as it seems to be something my computer misses ?) :

    all:
    	@echo "** Building the game"
    	g++ -g -Wall -o HollowRythm game.cpp stateMachine.cpp assetManager.cpp main.cpp splashState.cpp $(LIBS)
    	./HollowRythm

    Thank you !

  • Sonar Systems admin
    Likes 0

    Which tutorial series are you following?

  • Hornet
    Likes 0

    Hello ! It’s the Flappy Bird Clone tutorial, and the unique pointer is created in this video : https://www.youtube.com/watch?v=tgXEws1Ef8s

  • Sonar Systems admin
    Likes 0

    Did you run it at the point that it was run in the video.

  • Hornet
    Likes 0

    I did, and I had this compilation error

  • Sonar Systems admin
    Likes 0

    What version of everything are you using?

  • Hornet
    Likes 0

    I’m using the g++ compilator which caracteristics are :

    Apple LLVM version 10.0.0 (clang-1000.10.44.2)

    Target: x86_64-apple-darwin18.2.0

    Thread model: posix

  • Sonar Systems admin
    Likes 0

    I mean of the different frameworks.

Login to reply