我刚刚从 VS2005 迁移到 VS2010,它无法编译一个简单的程序。
#include <iostream>
using std::cout;
using std::endl;
int main()
{
cout << "Hello Visual Studio 2010 :)" << endl;
}
错误 -
1 error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.
2 IntelliSense: cannot open source file "iostream"
3 IntelliSense: name followed by '::' must be a class or namespace name
4 IntelliSense: name followed by '::' must be a class or namespace name
5 IntelliSense: identifier "cout" is undefined
6 IntelliSense: identifier "endl" is undefined
PS:我对使用 VS2010 完全陌生,但对 VS 2005 有经验。
以下是我在“用户属性表”下从 VS2005 添加到 VS2010 的目录列表
可执行文件 -
$(VCInstallDir)bin; $(VSInstallDir)Common7\Tools\bin; $(VSInstallDir)Common7\tools; $(VSInstallDir)Common7\ide; $(VSInstallDir); $(VSInstallDir)\SDK\v2.0\bin
包括 -
$(VCInstallDir)include; $(VCInstallDir)atlmfc\include; $(FrameworkSDKDir)include
图书馆 -
$(VCInstallDir)lib; $(VCInstallDir)atlmfc\lib; $(VCInstallDir)atlmfc\lib\i386; $(FrameworkSDKDir)lib; $(VSInstallDir); $(VSInstallDir)lib
来源 -
$(VCInstallDir)atlmfc\src\mfc; $(VCInstallDir)atlmfc\src\mfcm; $(VCInstallDir)atlmfc\src\atl; $(VCInstallDir)crt\src