开发者

how can i prevent vs 2008 express compile all my files but only the one i modify

how can i prevent vs 2008 express from compiling all my cpp files 开发者_开发百科if i only modify one cpp file , that is not using the other onecs?


Compilation is an either-or process. All the files in your project are compiled into a single assembly/executable, not each individually. The compiler may have some tricks up its sleeve to make compilation more efficient when only one file has been changed, but in the end there is no way to compile a single C++ project one file at a time.


How have you got your cpp files organised?

If they are organised into projects then building a project will only compile those cpp files that have changed since the last build.

Visual Studio works this out by checking the time stamp on the cpp file and comparing against that on the output intermediate file (not the exe). So once you've built everything once VS should only build what's been modified.

Make sure you're using "build" not "rebuild" and with C++ if you modify a header file then all the cpp files using that header will have to be built too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜