Dragonfly Q&A

Problem with Makefile

0 like 0 dislike

I've been getting some errors that lead me to believe that my Makefile (for the Dragonfly Egg project) is incorrect. My code did compile without errors at some point, but I've made changes to the Makefile and other files since then. Here's the Makefile: http://pastebin.com/STuVzfhx

The errors I'm getting are:

make: *** [game] Error 1

recipe for target 'game' failed


Any advice would be appreciated.

closed with the note: Fixed
asked Sep 14, 2014 in Other by raesposito
closed Sep 14, 2014 by raesposito

1 Answer

0 like 0 dislike

Your Makefile looks fine, but it is hard to debug this visually.  You are doing this in Eclipse?  Open up a Cygwin terminal and type "make".  You should see a line like:

g++ game.cpp Manager.o LogManager.o -o game -lncurses -lrt

If you do not, something is wrong with your Makefile.  If you do, it should report an error that is more descriptive than "Error 1".

answered Sep 14, 2014 by claypool
Okay. The result: http://pastebin.com/XxrWEFGc

I'm not sure how to interpret it, but it's certainly more descriptive.
Every public method in your .h file needs to be defined in your .cpp file.  Specifically, you have ~LogManager() declared in LogManager.h and you need to define it in LogManager.cpp file.  Ditto for the other methods.
Thanks, it's fixed.
More information about Dragonfly can be found on the Dragonfly Home Page.