Jump to content
  • Advertisement
Sign in to follow this  
Tradone

Compiling.

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

Whenever I compile, I use the whole syntax. 151# g++ -o new_shenu.cgi new_shenu.cpp Algorithms.cpp Path.cpp Cookie.cpp Parameter.cpp now, there are more cpp files to compile. I think for this project there's going to be about 20~30 cpp files. and every time I need to recompile, it takes about 20 seconds when it takes long, is there a way to hasten this compilation procedure? like creating the object files manually and only linking those that have been changed? this is my first time dividing my code into serveral files. Thanks. any advice will be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
If you have foo.cpp, bar.cpp, and baz.cpp

g++ -c foo.cpp
g++ -c bar.cpp
g++ -c baz.cpp

g++ foo.o bar.o baz.o

Then you make a change to foo.cpp

g++ foo.cpp bar.o baz.o

See also: Make

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!