开发者

Quick question: Where is the C++ compiler located in Windows?

For some MATLAB code that I want to make executable, I need the location to a compiler in Windows. I have Visual Studio installed, so would I be able to reference the compiler that that uses? If so, how开发者_如何学C can I find it?

Thanks.


Run the "Visual Studio Command Prompt", and you'll have the environment setup for compilation.


You don't even have to Run the "Visual Studio Command Prompt". When you install Visual Studio, it sets the environment variable: VS90COMNTOOLS.

Using that variable, you can figure out that "%VS90COMNTOOLS%....\VC\bin" points to the directory that contains the compiler. So to invoke the compiler you can use: "%VS90COMNTOOLS%....\VC\bin\cl.exe".

Note the use quotes. This is because the VS90COMNTOOLS has spaces in it if you take the default install location under %ProgramFiles% or %ProgramFiles%(x86).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜