I try to run a windows program, which relies on a .dll, which is neither in the current directory nor in the directory of the program. The documentation mentions that the "WINEDLLPATH"-variable is used to give a hint for where to search for libraries. But I can't run the program even when this variable is set:
/home/rudi/foobar $ WINEDLLPATH=/opt/qt/win32/qt/5.6/mingw49_32/bin/ strace -o /tmp/cc1.log /opt/qt/win32/qt/Tools/mingw492_32/libexec/gcc/i686-w64-mingw32/4.9.2/cc1.exe --help
fixme:winediag:start_process Wine Staging 1.9.12 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
err:module:import_dll Library libwinpthread-1.dll (which is needed by L"Z:\\opt\\qt\\win32\\qt\\Tools\\mingw492_32\\libexec\\gcc\\i686-w64-mingw32\\4.9.2\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\opt\\qt\\win32\\qt\\Tools\\mingw492_32\\libexec\\gcc\\i686-w64-mingw32\\4.9.2\\cc1.exe" failed, status c0000135
/home/rudi/foobar $ grep libwinpthread-1.dll /tmp/cc1.log
stat64("/home/rudi/.wine/dosdevices/z:/opt/qt/win32/qt/Tools/mingw492_32/libexec/gcc/i686-w64-mingw32/4.9.2/libwinpthread-1.dll", 0xffcdf99c) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/z:/opt/qt/win32/qt/Tools/mingw492_32/libexec/gcc/i686-w64-mingw32/4.9.2/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/z:/home/rudi/foobar/libwinpthread-1.dll", 0xffcdf99c) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/z:/home/rudi/foobar/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/syswow64/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/system/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/syswow64/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/syswow64/wbem/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
open("/lib/wine/libwinpthread-1.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/wine/libwinpthread-1.dll.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/opt/qt/win32/qt/5.6/mingw49_32/bin//libwinpthread-1.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/qt/win32/qt/5.6/mingw49_32/bin//libwinpthread-1.dll.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
The irritating part are the last two lines. Wine tries to open /opt/qt/win32/qt/5.6/mingw49_32/bin//libwinpthread-1.dll.so, which would be the correct file, if there was not the .so suffix.
Is there a way to persuade wine to consider the .dll files at /opt/qt/win32/qt/5.6/mingw49_32/bin/ the same way it treats files from $PWD or the program directory?