Jump to content
  • Advertisement
Sign in to follow this  
Hawkblood

C++ VS2017 not compiling small changes

Recommended Posts

Just as the title implies, when I make a small change such as "x=4;" now to read "x=5;" the compiler doesn't build that part of the code and leaves me with the old value. It correctly compiles when I select "rebuild solution"....

How do I fix this?

Share this post


Link to post
Share on other sites
Advertisement

Hmmm, that's odd. It's certainly not the case for my installation of VS2017.

What version are you using (this should work on every version, but it's good to know this info)?

Are the files you're changing in a project? 

Can you create a minimal reproducible example or is it just happening in one particular solution?

Share this post


Link to post
Share on other sites

I get this in VS2015 Pro (Update 2) if the small constant is in a header file. 

It's extremely annoying :( 

Share this post


Link to post
Share on other sites

Check the timestamp of the file (if it's odd, too old or in the future) and make sure it's included in the project.

 

You might try to crank up the build output to diagnostic. It'll show pretty every decision it makes, there might be some reason why in there.

Share this post


Link to post
Share on other sites

Visual Studio does this intentionally in order to reduce compile time. I used to experience this issue in an older version of Visual Studio. I am also using version 2017 but I can't reproduce the same issue in my code. Sadly, I can't remember how I solved it then.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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!