[Wine] Wine does not use PATH for DLL search, is this a bug or feature ?

L. Rahyen research at science.su
Mon Sep 24 23:18:21 CDT 2007

	(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:


	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 
	Here is an example:

% echo $PATH
% wine cmd
CMD Version 0.9.45


More information about the wine-users mailing list