简体   繁体   中英

Build both release/debug VS2010 C++

为什么要在发布配置下进行构建,然后在VS2010 C ++中在调试配置下进行同一项目的另一种构建,才能使调试看到更新的代码?

Because each build links to different core libraries, uses different compiler/linker settings, creates different assembly code, and hence different executables, the release one probably more optimized. Btw there is a Batch Build menu item under the Build menu allowing to build everything with one click.

You don't have to. You only have to build the configurations which you want updated. That is, if you change your code and want to have Debug "see" the updated code, just build Debug. You don't have to build Release.

Of course, then your Release build will not "see" the new code until you build it again.

If you're asking why they have to be built separately - because the code generated by each of these settings is fundamentally different, so there's now way to "reuse" it somehow.

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