简体   繁体   English

Visual C ++ 2008:无法将win64设置为项目的活动构建配置

[英]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. 我在64位Windows 7上安装了Visual Studo 2008.我需要构建64位二进制文​​件。

I'm building the solution using devenv command: devenv mysolution.sln /build "RELEASE|WIN64" 我正在使用devenv命令构建解决方案:devenv mysolution.sln / build“RELEASE | WIN64”

It skipped building all projects. 它跳过了构建所有项目。 So I opened the solution in Visual Studio, and in the build Configuration manager, I set 所以我在Visual Studio中打开了解决方案,在构建配置管理器中,我设置了

Active Solution Configuration: Release Active Solution Platform: win64 Active Solution配置:发布Active Solution Platform:win64

But in the Project contexts (check the project configurations to build or deploy): 但是在Project上下文中(检查要构建或部署的项目配置):

Configuration: Release Platform: Win32 alone is available in this dropdown, not win64. 配置:发布平台:此下拉列表中仅提供Win32,而不是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&current=buildconfiguration.jpg 以下是显示我的配置管理器的屏幕截图: http//s289.photobucket.com/albums/ll211/spiderman2_photo_bucket/?action = view&current = 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): 另一种解释是您需要安装X64编译器和工具 ,默认情况下不会检查它们(即使在Windows 7 64位上):

在此输入图像描述

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. 您仍然需要为每个项目单独添加64位平台:在项目的Platform下拉列表中,选择<New...> ,然后选择x64作为平台。 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. 回到Configuration Manager,选择x64作为为Win64解决方案平台构建的平台。 On a sidenote, I highly recommend you to learn how to use propery sheets as they provide a reusable way to declare project settings. 在旁注中,我强烈建议您学习如何使用propery sheet,因为它们提供了一种可重用的方式来声明项目设置。

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. 您需要添加Win64平台并将配置从Win32复制到Win64。

This kind of makes sense since you probably have a different link path for your Win32 and Win64 libraries or different dll name. 这种情况很有意义,因为您的Win32和Win64库可能有不同的链接路径或不同的dll名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从C / C ++(Win64)的内存中加载64位DLL - loading 64-bit DLLs from memory in C/C++ (Win64) C++ 如何在 Win64 Win32 上执行 _wfindfirst 和 _wfindclose - C++ How to _wfindfirst and _wfindclose on Win64 Win32 Visual C ++ 2008 Express项目的生成过程 - Build Process for a Visual C++ 2008 Express Project Premake4:如何将mac os x xcode C ++项目设置为具有“仅构建活动配置”选项处于活动状态? - Premake4: How to set mac os x xcode C++ project to have option “build active configuration only” active? _WIN64未在x64项目中定义 - _WIN64 is not defined in x64 project 在虚幻引擎 Win64 C++ ZA2F2ED4F8EBC2CBB4C21A29DC40AB6 中使用 x86 DLL - Using x86 DLL in an unreal engine Win64 C++ class C ++中用户定义类型的静态初始化(Win64 / PC) - static initialization of user defined type in C++ (Win64/PC) 为什么我无法通过win64提升1.54来编译VS2012 C ++代码? - Why I fail to compile VS2012 C++ code with boost 1.54 over win64? 如何在Visual C ++ 2008中将MFC应用程序项目添加到Win32应用程序项目 - How to add MFC application project to Win32 application project in Visual C++ 2008 将C ++ Win32 Console项目类集成到Visual Studio 2008中的Visual C ++(Windows窗体应用程序)项目中 - Integrate C++ Win32 Console project classes into Visual C++ (Windows forms application) project in Visual Studio 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM