简体   繁体   中英

How to get Visual Studio 2013 to not stop the build on errors (C++)

My Visual Studio 2013 (on Windows 7) stops the C++ build when there are errors without attempting to compile all the files. It will report errors from multiple files, but seems to stop after compiling files in the same project folder if there are errors in those files. (I can't say for sure that that's what it's doing.) After I correct those errors and build again, it will continue on until it finds errors in another batch of files and then quit again. I can't seem to find any setting that controls this, and I'm pretty sure it's not supposed to be the default behavior.

I am well aware that a final build product cannot be produced when there are errors. The goal is not to avoid fixing errors. The goal is to be able to start a build, do something else for a while, come back, and have all errors in the entire project waiting in a list to get fixed at once.

The termination of the build process depends on the severity of the defect and the confusion within the compiler.

Some errors are either so severe that the compiler can't continue or there are so many repetitive issues that the compiler gives up. The GNU compilers will usually summarize and only issue one notification for repetitive errors or warnings.

Some errors will cause the compiler to get confused. The error interfere with how the language is parsed and so the compiler gives up. Many examples are the omission of semicolons, closing braces or closing comments.

Other factors may break the build such as missing files, old object files, confused symbol files (many times in Visual Studio).

With Visual Studio you need remove all errors in the project before you can compile. If you separate the non-compilable files from the project that will allow you to compile as long as you don't need them. If you do need them Then you MUST fix the errors. Compiler errors are there for a reason. Fix the errors or comment the bad code out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM