environment variable of visual studio path?

别说谁变了你拦得住时间么 提交于 2019-12-11 00:39:41

问题


Thanks for reading this thread.

Basically I am wondering how I can use relative path/environment variable pointing to visual studio 2012 vcvarsall.bat file in a script?

I am currently using absolute path:

call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64

How can I do something like this?

call "$(System)\$(Program Files)$(VS)\$(VC)\vcvarsall.bat" x86_amd64

Thanks a lot.

EDIT

What if I have more than one version of visual studio? I have vs2008 and vs2012 both installed on my computer.


回答1:


Using a Visual Studio macro VCInstallDir

call $(VCInstallDir)vcvarsall.bat

Or without Visual Studio macros use VS110COMNTOOLS

call $(VS110COMNTOOLS)..\..\VC\vcvarsall.bat


来源:https://stackoverflow.com/questions/22380636/environment-variable-of-visual-studio-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!