Search code examples
c++recompile

Visual C++ studio, recompiling only the modified files


I have two dll files made by around 1500 cpp files. When I need to edit one, I usually then recompile all the 1500 files from the start. But I heard there is a way to make Visual Studio recompile the modifies only, taking a lot less time... How do I do this?


Solution

  • VS is actually pretty good in doing the dependency checks so that only necessary stuff is re-compiled. I can see a couple of (more or less likely) reasons for what you're seeing:

    • You modify a header and that's been included everywhere.
    • You're hitting "rebuild" instead of "build".
    • You have included a cpp file.
    • Something's fishy with your projects, your disk, or your date.

    That's in what I consider decreasing probability order.