Visual C++ 2008: Unable to set win64 as the active build configuration for project
I have installed Visual Studo 2008 on my 64 bit Windows 7. I need to build 64 bit binaries.
I'm building the solution using devenv command: devenv mysolution.sln /build "RELEASE|WIN64"
It skipped building all projects. So I opened the solution in Vis开发者_运维问答ual Studio, and in the build Configuration manager, I set
Active Solution Configuration: Release Active Solution Platform: win64
But in the Project contexts (check the project configurations to build or deploy):
Configuration: Release Platform: Win32 alone is available in this dropdown, not win64.
What do I need to do? Please help. Here is the screenshot showing my Configuration Manager: http://s289.photobucket.com/albums/ll211/spiderman2_photo_bucket/?action=view¤t=buildconfiguration.jpg
Another explanation is that you need to install X64 Compilers and Tools, which aren't checked by default (even on Windows 7 64 bit):
you still have to add the 64bit platform to each project individually: in the Platform
dropdown for the project, select <New...>
, then select x64
as the platform. You may choose to copy the build settings from the current configuration. Back in Configuration Manager select x64
as the Platform to build for the Win64 Solution Platform. On a sidenote, I highly recommend you to learn how to use propery sheets as they provide a reusable way to declare project settings.
Each project has their own set of configurations. Unless you add the configuration, the project does not have it. (Note: configurations are only names.) The configuration is bound to the platform, as a result just switching the platform won't do much. You need to add the Win64 platform and copy the configurations form Win32 to Win64.
This kind of makes sense since you probably have a different link path for your Win32 and Win64 libraries or different dll name.
精彩评论