I am working on a project that has around a hundred different files (.cpp & .h), and it requires around an hour to build the entire project on MSVC 2008, suppose that I now make a change to any one file, do I need to build the entire project once again, right from the beginning, or is there a way out ?I know it is very very noob like, but I am wasting a lot of time, hence I was wondering
Is a new build required everytime I make a change to the code?
development process;visual studio;builds
The short answer: It depends.The long answer: It depends on your source code dependencies.For example, if every class knows about every other class in the project, then every time you make a change to one, you probably have to recompile the other.It also depends on linkage. If you link everything into one binary file, it's also likely to compile everything again. A better way would be to separate to different shared libraries (DLLs), or at the very least into separate object (.o) files.But then (in the latter case) you might need to tinker with it to see that it doesn't recompile all object files when you just need to recompile one and link them all together again.But then again, maybe the linking process takes a while too. You basically need to experiment with that.On a final note... An hour for building ~100 files? That's way, way too much, unless you're running on a really old machine. Or unless each file contains tens of thousands of lines.