Archived

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

Makefile Problems

This topic is 5890 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