Jump to content
  • Advertisement
Sign in to follow this  
digitalfreak

VC++ compiler doesn't recompile headers when buiding project?

This topic is 4947 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 had a function declaration in a .h file, and it has default arguments in the declaration. the function's definition is in the corresponding .cpp file. when I change the default arguments to other default values in the header file and build the project, I found it still uses the old default value. pls explain. thanx.

Share this post


Link to post
Share on other sites
Advertisement
When you compile your project, the compiler tries to determine what files it actually needs to recompile and compiles them. What is probably happening is that the CPP files where you actually use the default variables haven't changed when you recompile, and so the compiler thinks that it can skip them. When this happens, simply use the "Rebuild All" option of Visual Studio.

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!