Advertisement

I have recompiled everything!

Started by May 19, 2018 03:01 AM
3 comments, last by frob 6 years, 3 months ago
I redownloaded some DLLs and put them in my project ( MSVC 6 ) and for some reason, every time i build... it compiles EVERYTHING, not just what needs to be compiled. how do i change so it compiles only the files that changed? i think it has something to do with the .obj files?
 

Is there any particular reason you're using such an outdated development environment? Visual Studio 6 is a whopping 20 years old!

Newer versions of Visual Studio are freely available, and there are other alternatives also freely available.

 

You'll likely find trouble getting help with such outdated tools, and there are some serious compatibility issues.

- Jason Astle-Adams

Advertisement

In newer versions of VS you can set the build output to diagnostic (or other levels). I don't know about MSVC 6, if such an option exists.

It will output quite a lot, but it will tell you why it thinks a file needs to be recompiled. 

 

Otherwise, check, if any file has a modification date in the future, or is included, but does not exist, that could cause this effect.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Rounding out the other two comments of using newer tools and using diagnostic output...

Dependency checking is based on date.  Each file has a dependency.  Executables depend on the libraries and object files.  Object files depend on the .cpp files.  The .cpp files depend on the .h files they include, etc.

If the file is missing then it is built.  If a dependency is newer than what exists then the items is rebuilt.

 

So working through that, the reasons it is probably rebuilding are:

* You've changed a dependency so the files really do need to be rebuilt.

* You've changed the timestamps so the dependencies are newer than their target, so the compiler assumes the compiled file is out of date.

* You've got custom steps or tools so the compiler doesn't know the dependency tree so it always assumes the file is out of date.

 

Detecting those changes requires significant work and either a partial compilation or saved information about the dependency tree. If the dependency tree has been saved then every file's timestamp needs to be read and processed.  If the dependency tree has not been saved the compiler will still need to do a partial compile to ensure all the headers and dependencies have dates that are older than the output files.

 

This topic is closed to new replies.

Advertisement