看了dodolook写的我也要学C语言-第二章:第一个C程序的编译初解,也想试试用CL编译器手动编译C程序。
电脑上装了VS2010,在Microsoft Visual Studio 10.0\VC\bin中找到cl.exe文件。于是,在命令行中进入这个目录,运行cl,却出现错误提示:
cl.exe - System Error
---------------------------
The program can't start because mspdb100.dll is missing from your computer.
Try reinstalling the program to fix this problem.
搜索了一下,原来藏在Microsoft Visual Studio 10.0\Common7\IDE中,将该路径加入环境变量path中即可:
path=%path%;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"