Sam Adamsh
Sam Adamsh

Reputation: 3391

Build both release/debug VS2010 C++

Why do you have to build under release configuration, followed by another build of same project in debug configuration in VS2010 C++ to be able to have the debug see updated code?

Upvotes: 1

Views: 539

Answers (2)

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.

Upvotes: 4

stijn
stijn

Reputation: 35901

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.

Upvotes: 4

Related Questions