I got a big problem. I do not know why
I write a very simply C++program.I put it below
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
cout<<"helo to C++";
return 0;
}
When I build it , it will show me a error:
hello.cpp
Linking...
Embedding manifest...
Project : error PRJ0003 : Error spawning 'cmd.exe'.
Build log was saved at "file://c:\Documents and Settings\LXY\My Documents\Visual Studio 2005\Projects\hello\hello\Debug\BuildLog.htm"
hello - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
But if I run it through the Visual Studio 2005 Command Prompt , it will show me the result which I want . What is the problem

Error spawning cmd.exe in simple C++ application
Muhammad Hegab
What does the BuildLog.htm show you about the error spawning 'cmd.exe'.
If you type Start | Run and enter "cmd" in the dialog window, can you start cmd.exe
- orcmid
egreen
Thank you very much !
I just have figure it out by copying "cmd.exe" from the system32 to VC\bin.
Now I can build by F7 and run it by Crtl + F5 .
But I have another problem that when I just press F5, it will show me a error.
Thanks
Hawk
Feo
I've just had the same Error spawning cmd.exe having just installed VcExpress & SDK
I found a solution that works for me in the Beta2 forum;
Project -> "Your project" Properties -> Configuration Properties-> Manifest Tool ->Input and Output -> Embed Manifest = No
Mine was set to Yes; changing it to No gave me a clean build
John Love
I take it you found your solution by searching the forum. Note that if you need to this action, it indicates that there is something wrong either with your Visual Studio installation, or your Windows installation.
There are two places to check for your path. The first is in Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show Directories for "Executable files". This list SHOULD include $(PATH) at the bottom. If it doesn't, you'll get this cmd.exe error.
The second place to check is from Windows itself (Control Panel -> [Performance and Maintenance] -> System -> Advanced -> Environment Variables -> System variables). In this list, the PATH variable should at least contain C:\Windows\System32 (or possibly %systemroot%\System32). If not, these problems are going to affect more than just Visual Studio.
JawCo
This is a good workaround. It seems that the path or command used by the VC++ IDE is incorrect. It would be good to find out what that is about and repair it. Let me know if you would like to experiment finding the problem.
Meanwhile, congratulations on finding a solution.
- orcmid
rkarem
When you start with F5, there will be information in your Output window. There should be nothing in the Error window. Is that what you are noticing
It is probably the case that your program ran, but it was so quick that you did not see the output window, which closes as soon as the program is complete.