Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access windows enviroment variables on MSYS?

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 ?

like image 212
Mostafa Sataki Avatar asked Oct 21 '25 14:10

Mostafa Sataki


1 Answers

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  
like image 108
fececagec812 Avatar answered Oct 23 '25 02:10

fececagec812



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!