开发者

Trying to compile with cl.exe

开发者_运维知识库

Sorry if this is a simple question, I don't do much programming in Windows. I have Visual Studio installed but when I try to execute "cl" from the command line it tells me it's not recognized as a command!

How do I get cl?


Open a Visual Studio command prompt window that automatically setups the correct path and other settings for you. If you cannot do that, here are instructions on doing it manually: http://msdn.microsoft.com/en-us/library/f2ccy3wt(VS.80).aspx


It's in the VC\bin subdirectory of your visual studio install directory. So you need to get that directory in your PATH for the command line. You can do this by hand if you are already setting up your command environenment, or look for vsvars32.bat in the Common7\Tools subdirectory of your Visual Studio install.

set VS

in your command window, do you see something like this?

c:>set vs
VS80COMNTOOLS=c:\Vs2005\Common7\Tools

If you do, then you can just type

%VS80COMNTOOLS%vsvars32.bat

and it should setup PATH, LIB and INCLUDE so that you can use cl from that command prompt.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜