Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Makefile Problems

This topic is 6108 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m in a C++ class in college and having a little trouble with my makefile. We''re using a unix version of g++ and we have to write our own makefiles. Supposedly this is somehow easier than using MSVC++ or some crap like that. anyway - my makefile doesn''t quite work correctly. I can get it to work but it won''t work the way I need it to to get any grade at all on my project assign6 : String.o assign6.o g++ -Wall -o assign6 assign6.o String.o String.o : String.h String.C g++ -Wall -c String.h String.C assign6.o : assign6.C String.h g++ -Wall -c assign6.C String.h clean : -rm *.o assign6 there it is. When I type make at the prompt it tells me this - g++ -Wall -c String.h String.C g++: Compilation of header file requested *** Error code 1 make: Fatal error: Command failed for target `String.o'' If I type "make String.o" and then make it goes without a hitch, but if it doesn''t make by only typing make I get a 0. if anyone could help that''d be great. Use the WriteCoolGame() function Works every time

Share this post

Link to post
Share on other sites
Original post by Agincourt
g++ -Wall -c String.h String.C

Remove the header file from this (and all similar) line.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!