简体   繁体   English

Visual Studio 11的生成问题

[英]Build issues with Visual Studio 11

I am building a simple program on VS 11 Professional beta edition. 我正在VS 11 Professional beta版上构建一个简单的程序。

#include <iostream>
int main(){
    std::cout << "Hello World" << std::endl;
}

But I am getting RC errors. 但是我收到了RC错误。

1>------ Build started: Project: Stephen, Configuration: Debug Win32 ------
1>Build started 5/23/2012 8:31:30 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\Stephen.unsuccessfulbuild".
1>ClCompile:
1>  Source.cpp
1>RC : fatal error RC1106: invalid option: -ologo
1>  
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.67
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

If I just compile the source file alone (ie, not building the project), it compiles. 如果我仅编译源文件(即,不构建项目),则它将编译。 I googled on this error but didn't find much useful information. 我搜索了此错误,但没有找到太多有用的信息。 I have seen the compiler and linker properties. 我已经看到了编译器和链接器属性。 No, where -ologo option is seen. 不,在-ologo可以看到-ologo选项。 I amn't sure where this invalid option is coming from. 我不确定这个无效的选项来自哪里。

I have VS 2005, 2010 installed on my system. 我的系统上安装了VS 2005、2010。 Does this has anything to do with this error ? 这和这个错误有关吗? Any help is aprreciated. 任何帮助表示赞赏。

Go to project -> Properties -> Configuration Properties -> General . 转到project -> Properties -> Configuration Properties -> General Change the platform toolset to the correct toolset you are using. 将平台工具集更改为您正在使用的正确工具集。 Or just change Suppress Startup Banner to 'no' . 或者只是将“ 禁止启动横幅”更改为“否”

If you are migrating your sourcecode from 32-bit to 64-bit platform and you encounter this error during build, do the following: 如果要将源代码从32位平台迁移到64位平台,并且在构建过程中遇到此错误,请执行以下操作:

  1. Select your Project on the Solutions explorer. 在解决方案资源管理器中选择您的项目。
  2. From menu, select Project->Properties->Configuration Properties->VC++ Directories 从菜单中,选择项目->属性->配置属性-> VC ++目录
  3. On "Executable Directories", check if "$(WindowsSdkDir)\\bin" exist - Check first what is "WindowsSdkDir" by clicking the down arror->edit->click "Macros" button and see where it is pointing... Usually it is in "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin" 在“可执行目录”上,检查是否存在“ $(WindowsSdkDir)\\ bin”-通过单击向下箭头-> edit->单击“宏”按钮,首先检查什么是“ WindowsSdkDir”,然后查看其指向的位置。它位于“ C:\\ Program Files(x86)\\ Windows Kits \\ 8.1 \\ bin”中
  4. Check if there are executable files under "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin" 检查“ C:\\ Program Files(x86)\\ Windows Kits \\ 8.1 \\ bin”下是否有可执行文件
  5. If none, then there could be folders under "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin" 如果不存在,则可能在“ C:\\ Program Files(x86)\\ Windows Kits \\ 8.1 \\ bin”下存在文件夹
  6. Go to "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86" and check if "RC.exe" exist 转到“ C:\\ Program Files(x86)\\ Windows Kits \\ 8.1 \\ bin \\ x86”,然后检查是否存在“ RC.exe”
  7. If "RC.exe" exist then go back to Step 1, Step 2. 如果存在“ RC.exe”,请返回步骤1,步骤2。
  8. On "Executable Directories", change "$(WindowsSdkDir)\\bin" to "$(WindowsSdkDir)\\bin\\x86" 在“可执行目录”上,将“ $(WindowsSdkDir)\\ bin”更改为“ $(WindowsSdkDir)\\ bin \\ x86”
  9. Click "Apply" then "Ok" button. 单击“应用”,然后单击“确定”按钮。
  10. Rebuild your project and that should solve your problem. 重建您的项目,那应该可以解决您的问题。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM