Kuang-Chun Cheng
2007-Sep-25 03:31 UTC
[Wine] Wine does not use PATH for DLL search, is this a bug or feature ?
Hi, I test both 0.9.44 and 0.9.45 and found that Wine does not use PATH environment variables for DLL search. My test application is a Qt 336 application, QSlider.exe. QSlider.exe require both qt-mt336.dll and mingwm10.dll. If I copy both dll to ~/.wine/drive_c/windows/system32, I can invoke QSlider.exe from anywhere and it works OK. If I put both dlls to, eg. /opt/qt-3.3/bin. And setup PATH with /opt/qt-3.3/bin included. Invoke QSlider.exe will give me error message: err:module:import_dll Library qt-mt336.dll (which is needed by L"Z:\\home\\kcc\\QSlider.exe") not found err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\kcc\\QSlider.exe" failed, status c0000135 My guess is wine just simple ignore PATH environment variable when searching DLL, am I correct ? Is this a bug or a feature ? Under WinXP/2K ... the PATH env. variables do work ... but not Wine. Can someone confirm this ? Thanks a lot. Regards KC
Paul Romanyszyn
2007-Sep-25 03:47 UTC
[Wine] Wine does not use PATH for DLL search, is this a bug or feature ?
Kuang-Chun Cheng wrote:> Hi, > > I test both 0.9.44 and 0.9.45 and found that Wine does not use > PATH environment variables for DLL search. > > My test application is a Qt 336 application, QSlider.exe. > QSlider.exe require both qt-mt336.dll and mingwm10.dll. If I copy > both dll to ~/.wine/drive_c/windows/system32, I can invoke QSlider.exe > from anywhere and it works OK. > > If I put both dlls to, eg. /opt/qt-3.3/bin. And setup PATH with > /opt/qt-3.3/bin included. Invoke QSlider.exe will give me error message: > > err:module:import_dll Library qt-mt336.dll (which is needed by > L"Z:\\home\\kcc\\QSlider.exe") not found > err:module:LdrInitializeThunk Main exe initialization for > L"Z:\\home\\kcc\\QSlider.exe" failed, status c0000135 > > My guess is wine just simple ignore PATH environment variable when > searching DLL, > am I correct ? Is this a bug or a feature ? > Under WinXP/2K ... the PATH env. variables do work ... but not Wine. > Can someone confirm this ? Thanks a lot. > > > > Regards > KCIf you use a bat file to set the path to z:\\opt\\qt-3.3\\bin then run your program and it should work. Or in system.reg search for "PATH" and add the z:\\opt\\qt-3.3\\bin in this entry. Paul R.
L. Rahyen
2007-Sep-25 04:07 UTC
[Wine] Wine does not use PATH for DLL search, is this a bug or feature ?
On Tuesday September 25 2007 03:31, Kuang-Chun Cheng wrote:> Hi, > > I test both 0.9.44 and 0.9.45 and found that Wine does not use > PATH environment variables for DLL search. > > My test application is a Qt 336 application, QSlider.exe. > QSlider.exe require both qt-mt336.dll and mingwm10.dll. If I copy > both dll to ~/.wine/drive_c/windows/system32, I can invoke QSlider.exe > from anywhere and it works OK. > > If I put both dlls to, eg. /opt/qt-3.3/bin. And setup PATH with > /opt/qt-3.3/bin included. Invoke QSlider.exe will give me error message: > > err:module:import_dll Library qt-mt336.dll (which is needed by > L"Z:\\home\\kcc\\QSlider.exe") not found > err:module:LdrInitializeThunk Main exe initialization for > L"Z:\\home\\kcc\\QSlider.exe" failed, status c0000135 > > My guess is wine just simple ignore PATH environment variable when > searching DLL, > am I correct ? Is this a bug or a feature ? > Under WinXP/2K ... the PATH env. variables do work ... but not Wine. > Can someone confirm this ? Thanks a lot.WINE use PATH variable in the registry. Of course environment variable is a different thing. In Windows you don't use Linux environment variables and Linux shell (this is obvious): you are using cmd instead. WINE is no different so to get access to WINE environment you need to run this: wine cmd And now type this: PATH You will see current PATH environment variable. I didn't test it but I guess it will work correctly if you change it (if not this is a real bug). To me it seems that you confuse Windows cmd environment with Linux shell environment. Here is an example: % echo $PATH /usr/local/kde/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/games:/usr/share/lg3d/bin:/opt/maxwell64 % wine cmd CMD Version 0.9.45 Z:\var\pkgs\nvidia>PATH PATH=c:\windows\system32;c:\windows
L. Rahyen
2007-Sep-25 04:18 UTC
[Wine] Wine does not use PATH for DLL search, is this a bug or feature ?
(Mistakanly sent this from wrong e-mail, so I resend this message from e-mail address which is subscribed to this list). On Tuesday September 25 2007 03:31, Kuang-Chun Cheng wrote:> Hi, > > I test both 0.9.44 and 0.9.45 and found that Wine does not use > PATH environment variables for DLL search. > > My test application is a Qt 336 application, QSlider.exe. > QSlider.exe require both qt-mt336.dll and mingwm10.dll. If I copy > both dll to ~/.wine/drive_c/windows/system32, I can invoke QSlider.exe > from anywhere and it works OK. > > If I put both dlls to, eg. /opt/qt-3.3/bin. And setup PATH with > /opt/qt-3.3/bin included. Invoke QSlider.exe will give me error message: > > err:module:import_dll Library qt-mt336.dll (which is needed by > L"Z:\\home\\kcc\\QSlider.exe") not found > err:module:LdrInitializeThunk Main exe initialization for > L"Z:\\home\\kcc\\QSlider.exe" failed, status c0000135 > > My guess is wine just simple ignore PATH environment variable when > searching DLL, > am I correct ? Is this a bug or a feature ? > Under WinXP/2K ... the PATH env. variables do work ... but not Wine. > Can someone confirm this ? Thanks a lot.WINE (and Windows) use PATH variable in the registry and this is probably what you want to use. Of course environment variable is a different thing. In Windows you don't use Linux environment variables and Linux shell (this is obvious): you are using cmd instead. WINE is no different so to get access to WINE environment you need to run this: wine cmd And now type this: PATH You will see current PATH environment variable. I didn't test it but I guess it will work correctly if you change it (if not this is a real bug). To me it seems that you confuse Windows cmd environment with Linux shell environment. Here is an example: % echo $PATH /usr/local/kde/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/games:/usr/share/lg3d/bin:/opt/maxwell64 % wine cmd CMD Version 0.9.45 Z:\var\pkgs\nvidia>PATH PATH=c:\windows\system32;c:\windows
Maybe Matching Threads
- ocfs2 fencing problem
- [LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
- how to save xm dmesg into a file
- picture organizer -- need a bit of help
- Fonts cut off (Dawn of War, wine 0.9.45 +)