C语言出错
来源:百度知道 编辑:UC知道 时间:2024/05/18 07:01:22
--------------------Configuration: a - Win32 Debug--------------------
Compiling...
Error spawning cl.exe
a.obj - 1 error(s), 0 warning(s)
请高手解释下怎么处理
代码如下:
// s.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main(int argc, char* argv[])
{
printf("Hello World!\n");
return 0;
}
把源程序贴出来看一看
可能很多人在安装VC 6.0后有过点击“Compile”或者“Build”后被出现的
“Compiling... ,Error spawning cl.exe”错误提示给郁闷过。很多人的
选择是重装,实际上这个问题很多情况下是由于路径设置的问题引起的,
“CL.exe”是VC使用真正的编译器(编译程序),其路径在“VC根目录\VC98\Bin”下面,
你可以到相应的路径下找到这个应用程序。
因此问题可以按照以下方法解决:打开vc界面 点击VC“TOOLS(工具)”—>“Option(选择)”
—>“Directories(目录)”重新设置“Excutable Fils、Include Files、
Library Files、Source Files”的路径。很多情况可能就一个盘符的不同
(例如你的VC装在C,但是这些路径全部在D),改过来就OK了。
如果你是按照初始路径安装vc6.0的,路径应为:
executatble files:
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
C:\Program Files\Microsoft Visual Studio\VC98\BIN
C:\Program Files\Microsoft Visual Studio\Common\TOOLS
C:\Program Files\Microsoft Visual Studio\Common\TOOLS\WINNT
include files:
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
C:\Program Files\Microsoft Visua