Question

I am building a simple program on VS 11 Professional beta edition.

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

But I am getting RC errors.

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 (i.e., 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. I amn't sure where this invalid option is coming from.

I have VS 2005, 2010 installed on my system. Does this has anything to do with this error ? Any help is aprreciated.

Était-ce utile?

La solution

Go to project -> Properties -> Configuration Properties -> General. Change the platform toolset to the correct toolset you are using. Or just change Suppress Startup Banner to 'no'.

Autres conseils

If you are migrating your sourcecode from 32-bit to 64-bit platform and you encounter this error during build, do the following:

  1. Select your Project on the Solutions explorer.
  2. From menu, select Project->Properties->Configuration Properties->VC++ Directories
  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"
  4. Check if there are executable files under "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"
  6. Go to "C:\Program Files (x86)\Windows Kits\8.1\bin\x86" and check if "RC.exe" exist
  7. If "RC.exe" exist then go back to Step 1, Step 2.
  8. On "Executable Directories", change "$(WindowsSdkDir)\bin" to "$(WindowsSdkDir)\bin\x86"
  9. Click "Apply" then "Ok" button.
  10. Rebuild your project and that should solve your problem.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top