-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot use PATH/LD_LIBRARY_PATH for Windows binaries #2167
Comments
@darealshinji -
UPDATE: After more deep search, I think, it looks like not just a simple PATH problem; https://stackoverflow.com/questions/366928/invoking-cl-exe-msvc-compiler-in-cygwin-shell . You might need to rewrite contents of vcvars32.bat to shell script. |
Let me give you a better example: I have edit: Appearently I can use However I wish there was an easier solution. |
@darealshinji - Yes, I could not find the way how to set I coppied C:\msys64\usr\bin\bsdtar.exe to C:\Users\sunjoong\Desktop directory, and bsdtar.exe need msys-2.0.dll (and more dlls) but there were no such dlls in that directory. EDIT: You know, bsdtar.exe is a Msys2 binary, in other words, it's a windows binary that needs msys2-2.0.dll. I tested weither it could be run on WSL in the directory that does not have that dll. UPDATE: I hit upon why @darealshinji raised this issue could be related to #1494 and/or #1363. |
The cmd.exe /C 'set PATH...' worked great for me. In my ideal world though be able to use PATH and LD_LIBRARY_PATH in a bash shell for a Windows binary in the same way as I would for a Linux binary. Note that the title of this article is about PATH but LD_LIBRARY_PATH is as important. If getting PATH and LD_LIBRARY_PATH to work right is hard for Windows binaries would something like a WINDOWS_PATH in bash to mean "append this to the Windows PATH before executing a Windows binary" be easier? |
It is possible to get |
Microsoft Windows: Version 10.0.15063
On command prompt I can set
PATH
to make binaries search for DLLs in other directories. But doing the same in bash doesn't work. SettingLD_LIBRARY_PATH
doesn't work either. It can't find the required DLLs unless I change the working directory.Here's an example:
The same in bash:
In this example I was expecting
./cl.exe
to find the DLLs from the other directory and to run properly.The text was updated successfully, but these errors were encountered: