Jump to content
  • Advertisement
Sign in to follow this  
jchmack

linking dependencies (C++)

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

Is there a way to find out what .cpp files need what header files? My project is starting to get really complicated and I am trying to de-couple a lot of these to improve compile times.

Share this post


Link to post
Share on other sites
Advertisement
I guess one of the standard auto-dependency generators that are normally used with gcc would do the trick, but I'm not sure it will tell you what headers are actually *used*. My current strategy is to first strip out any unnecessary includes in the header files. If the definition of class A only uses pointers or references to class B, including B.hpp is not necessary. Avoid master include headers until they really provide fundamental definitions, like configuration preprocessor macros. Only when a cpp complains about a missing definition, you should add it in.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!