i use visual studio 2008, and i chose a .cpp in visual c++
at first i copied a tutorial sample
#include <stdio.h>
int main()
{
int x=1;
int n =1;
printf("Wie viele Zahlen wollen sie ausgeben lassen?: ");
for(int i=0; i < n; ++i)
{
x*=i; // x=x*i
printf("%d: %d\n", i, x);
}
return 0;
}
but i get an error
in german:Fehler beim Starten von "rc.e开发者_StackOverflowxe". --> Problem by statring "rc.exe"
what did i wrong?
These files are found in (if you have installed Microsoft SDK):
c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
Just add this path to (VC++ Directories -> Executable files)
for beginners: Visual Studio 2008:
Tools (menu) -> Options -> Projects and Solutions -> VC++ Directories -> Show Directories for: -> Executable files -> New Line (tiny square button with new folder icon)
Visual Studio 2010:
Project (menu) -> {your project name} properties -> Configuration Properties -> Executable Directories -> edit (from combo-box menu)
well finally i found the solution
vs2008 installs rc.exe in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin and there the rc.exe was missing, so i had download rc.exe and put it into that folder.
now it works
I don't think there is anything wrong with the code you posted. The error message you quoted would suggest that your project is set up to use resources and either the resource file isn't present or the compiler install isn't quite there.
Neither of them should make any difference to the program above. First, ensure that you've got it set as a Win32 Console executable and then make sure you don't have any resource (.rc) files around.
at first i copied a tutorial sample
Where did you copy the code ? (what source code ?)
When you start Visual Studio 2008, you did create a project ? what kind ? or did you simply created a new file and hope be be able to compile it ?
I suggest create a new Console (Win32 Console Application) project and paste the code in the auto-magically created "main" (probably called _tmain) of the project.
I just tried it and it work (at least compile and link).
Max.
I had the same problem last night with an old version of Visual Studio. I found that there is a known bug in AVG anti-virus that quarantines the rc.exe file.
In my case, after I had switched to a different anti-virus, I also installed another version of Visual Studio. Within that installation's files, I found the RC.exe file and pasted it into the file structure for the installation that was throwing the error. My code compiled and ran correctly after that.
Here is the path where I pasted rc.exe( I was using Visual C++ in VS 2003): C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin
精彩评论