分类
Visual C++ 2005 Express Edition Beta,编译"Hello, World" 编译出错
源代码:
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
return 0;
}
------ Build started: Project: Hello, Configuration: Debug Win32 ------
Embedding manifest...
Project : error PRJ0003 : Error spawning 'cmd.exe'.
Build log was saved at "file://e:My DocumentsVisual Studio 2005ProjectsHelloHelloDebugBuildLog.htm"
Hello - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
请指教。
好像不是编译错,是执行错,启动命令行窗口出了点问题。
以前兄弟在VS2003里遇到,重启机器就好了。
谢谢指教。不过重启也没有用,问题仍然出现。而且如果强制运行,会出现一个对话框:
This application has failed to start because MSVCP80D.dll was not found. Re-installing the application may fix this problem.
嘿嘿,刚安装上还什么都没干呢就让你重装。
另外我发现在 开始|所有程序|Visual C++ 2005 Epress Edition Beta 2|Visual Studio tools文件夹中有一个命令行窗口,运行的是C:Program FilesMicrosoft Visual Studio 8VCvcvarsall.bat
我猜想是上述运行问题是否和这个bat文件有关,还请高手进一步赐教。
vcvarsall.bat
这个是注册环境变量,以便找到命令行编译的路径
是不是安装没有安装好
我都装了三次啦。如问题再不能解决只好先卸载了。静待高手指教。
hj
to dunai2003(马尔罗尼)
你的操作系统是什么版本的?
This application has failed to start because MSVCP80D.dll was not found. Re-installing the application may fix this problem.
===============================================================
我没有用过vc2005,根据你这条提示猜可能是你的路径设只有问题,你在硬盘下搜索一下这个文件(msvc80d.dll),然后把它加到环境变量的path里,试试。
安装过程是否出现过什么问题?
安装应该没有问题,我也是出现这样的情况,单独进入命令行模式,用CL来编译可以通过,但是在IDE中就是不行,在工程属性中也无法更改工程类型,估计是哪个Win32应用程序惹的祸,程序的入口可能不是main(),变成了_tmain()或者其他什么的,但是不知道怎么更改过来,望高手指点!
'ggg.exe': Loaded 'C:Documents and SettingsFantasyMy DocumentsVisual StudioProjectsgggReleaseggg.exe', Symbols loaded.
'ggg.exe': Loaded 'C:WINDOWSsystem32ntdll.dll', Exports loaded.
'ggg.exe': Loaded 'C:WINDOWSsystem32kernel32.dll', Exports loaded.
The program '[3764] ggg.exe: Native' has exited with code 0 (0x0).
编译没问题,一切OK!
按CTRL + F5就能看到结果啦。。。。
我的系统是WinXP SP2英文版,我搜寻过MSVC80.dll,没有找到。问题仍然没有解决。
好像是找不到 cmd.exe 文件
试试把 %SystemRoot%system32;%SystemRoot% 加到 Path 环境变量
并且在 IDE的 菜单ToolsOptions的对话框里 选
"Executable files" 设置包括 $Path 这个路径
"Executable files" 选项在
options对话框的 "VC++ Directories" 目录下
自己顶一下
呵呵!!
我前几天到市场里去看了看有2005的买回来一安装却是2003的!!!
气死我了
“似乎”已经解决:打开项目后,点击Project|项目名 properties中找到configuration properties|Linker,右面的Generate Manifest选择No(缺省为Yes)点击OK。再编译,问题解决。
我发现这个方法的思路是:错误信息出现在编译和连结后 Embedding manifest...时发生的,肯定和manifest的生成有关,而manifest是CLR创建Assembly时生成的。我现在的程序并非托管代码,是一般的C++程序,因此不需要manifest。这样取消生成manifest后程序错误消失。
虽然问题“似乎”已经解决,我也能自圆其说,但以上仍属个人主观猜测,请诸位高手继续发表意见。