[英]Error compiling Visual Studio C++ project - error with cl.exe
I'm running Visual Studio 2005 Pro, and have been getting the following error recently: 我正在运行Visual Studio 2005 Pro,并且最近收到以下错误:
Error 1 Error result -1 returned from 'C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.
Reading some of the other posts around here, I've learned that cl.exe is native to VS 2008. I do have an install of 2008 Express (but C# only), and recently I uninstalled VS 2010 Express. 在这里阅读其他文章时,我了解到cl.exe是VS 2008的本机。我确实安装了2008 Express(但仅C#),最近又卸载了VS 2010 Express。
Could there be some sort of leftover compatibility issue going on here for me?
我这里可能会发生某种剩余兼容性问题吗?
edit Ok, let's go with it isn't a compatibility issue. 编辑好的,让我们开始吧,这不是兼容性问题。 Any thoughts on how to fix the error? 关于如何纠正错误的任何想法?
cl.exe是Microsoft C ++编译器,其名称至少与Visual Studio 6相同。它在Visual Studio 8文件夹中的事实也告诉您它是VS2005,因为VS2008是VS9,而VS2010是VS10。
Possibly although, VS 2008 installed into a "Visual Studio 9.0" directory and Visual Studio into "Visual Studio 10.0". 尽管可能,VS 2008安装到“ Visual Studio 9.0”目录中,而Visual Studio安装到“ Visual Studio 10.0”中。 So on balance I wouldn't have thought so. 所以总的来说,我不会这么想。
It turns out that the error is not with Visual Studio, but with the test suite that I'm ultimately working with. 事实证明,该错误不是与Visual Studio有关,而是与我最终使用的测试套件有关。 It replaces cl.exe and link.exe with its own executables, and moves them to different filenames. 它将cl.exe和link.exe替换为其自己的可执行文件,并将它们移至其他文件名。 Fixing some issues with my test suite made it work again. 解决了我的测试套件的一些问题后,它又可以正常工作了。
I didn't realize this until I ran cl.exe from the VS command line...thanks for the suggestions though! 直到我从VS命令行运行cl.exe时,我才意识到这一点。尽管如此,还是感谢您的建议!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.