问题:
C:>cl /LD hellomodule.c /Ic:\Python24\include c:\Python24 24\libs\python24.lib /link/out:hello.dll
“‘cl”不被识别为内部或外部命令、可操作的程序或批处理文件。
我正在使用,Edi教授,2008。
注:我正在学习这。
C:\>cl /LD hellomodule.c /Ic:\Python24\include c:\Python24\libs\python24.lib /li
nk/out:hello.dll
'cl' is not recognized as an internal or external command,
operable program or batch file.
C:\>PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe"
C:\>cl
'cl' is not recognized as an internal or external command,
operable program or batch file.
C:\>PATH="C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe"
C:\>cl /LD hellomodule.c /Ic:\Python24\include c:\Python24\libs\python24.lib /li
nk/out:hello.dll
'cl' is not recognized as an internal or external command,
operable program or batch file.
C:\>
发布于 2009-03-15 17:39:55
您可以使用
C:\程序文件\Microsoft 9.0\VC\vcvarsall.bat
发布于 2009-03-15 17:05:39
你能对你的问题说得更具体一点吗?什么东西不起作用?它不能找到程序,编译失败,等等。
我看到的唯一直接问题是命令行无法解决CL命令。尝试包含cl.exe二进制文件的完整路径。这是我机器上的相关路径。
C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe
编辑
使用path环境变量时,必须将其设置为路径,而不是应用程序。将路径代码更改为
set PATH=%PATH%;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
至于无法加载mspdb80.dll,我担心干扰您的环境变量可能会导致这个问题。重新启动您的cmd.exe shell,并添加上面指定的行并重试。如果mspdb80.dll仍然存在错误,则可能需要修复Visual安装。
EDIT2
显然,PATH环境变量正在扰乱mspdb80.dll的加载路径。这个线程有很多解决这个问题的方法。
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressinstall/thread/2a3c57c5-de79-43e6-9769-35043f732d68/
发布于 2009-03-15 17:11:09
我的程序菜单中有一个"Visual 2008命令提示符“。您是在使用该命令还是命令提示符?
https://stackoverflow.com/questions/648138
复制相似问题