How to access windows enviroment variables on MSYS?

非 Y 不嫁゛ 提交于 2019-12-13 17:06:37

问题


I want to build ffmpeg by vs2015 from msys2.

In the first add vs2015\vc\bin\amd64 in to path enviroment in windows.

Run "vs2015 x64 command prompt" as administrator then run vcvarsall.bat amd64.

In the final go to "msys" path and then run "msys2_shell.cmd".

I use "which cl" command for localize cl.exe.

Output:

which: no cl in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/)

How to access to windows enviroments in the msys ?


回答1:


Ran into the same problem.

Cause:

The PATH environment variable is not inherited to msys2.

Solution:

Rather than run msys2_shell.cmd alone, run it with a -use-full-path parameter:

 msys2_shell.cmd -use-full-path  


来源:https://stackoverflow.com/questions/40061101/how-to-access-windows-enviroment-variables-on-msys

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