Will Being
Will Being

Reputation: 57

In Visual Studio, how do I build 32-bit and 64-bit versions of a C++ project simultaneously?

I'd like to be able to build my solution to create 32-bit and 64-bit output executables in the same build for the same project. So I would invoke "Build Solution" and end up with, for example, ProjectName32.dll and ProjectName64.dll in the output folder. Is this possible?

Upvotes: 4

Views: 5033

Answers (2)

Eran
Eran

Reputation: 22030

You can use the Batch Build option to create more than one build in one action. Just check the configurations you'd like to build and go.

Upvotes: 5

ChrisF
ChrisF

Reputation: 137188

Each build - Any CPU, 64 bit or 32 bit is a separate configuration so has to be built separately.

The easiest solution is to use the Batch Build option and enable all the configurations you want to build.

You can set the output file name and directory for each configuration independently so you can set them to be "ProjectName32.dll" and "ProjectName64.dll" and have them both appear in the same folder. Make sure that the intermediate file folders are different though. Otherwise you might have issues debugging.

Upvotes: 1

Related Questions