Issue
I have a problem, I build and link a windows application on linux for windows using mxe (x86_64-w64-mingw32.shared), the build an linking is working well. Then I copy paste all usefull dll (that are all cross-compiled, except x64-msvcrt-ruby230.dll, which I get from the official windows installer).
I tested my program with wine, no problem it works like a charme and I spot no difference with the linux version. But once I put everything in my test VM (windows10 64bit inside virtualbox) I receive the error message:
The procedure entry point inflateValidate could not be located in the dynamic link library D:\libpng16-16.dll.
libpng16-16.dll is there, and when I objectdump it (in linux):
objdump -x libpng16-16.dll | grep inflate
3a9f4 60 inflate
3aa00 66 inflateEnd
3aa10 69 inflateInit2_
3aa20 73 inflateReset
3aa30 74 inflateReset2
3aa40 80 inflateValidate
[642](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x0000000000013be0 png_inflate_claim
[654](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000014280 png_zlib_inflate
[655](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x00000000000142d0 png_inflate.constprop.6
[657](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x0000000000014680 png_inflate_read.part.3.constprop.8
[3002](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000021b08 inflateReset2
[3023](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000021b28 inflate
[3081](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000021b00 inflateValidate
[3088](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000578 __imp_inflateReset2
[3119](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000568 __imp_inflateInit2_
[3138](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000560 __imp_inflateEnd
[3143](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000021b10 inflateReset
[3155](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000558 __imp_inflate
[3162](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000580 __imp_inflateValidate
[3197](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000570 __imp_inflateReset
[3244](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000021b20 inflateEnd
[3253](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000021b18 inflateInit2_
So apparently the symbol __imp_inflateValidate is present, so is there something I'm missing ? And does anybody know how to fix this ?
Thanks in advance
Solution
Just stumbled on the same problem. It turned out to be a confilicting dll file in the PATH environment varialble. try the ldd
command to find out which dll files might be suspicious.
for instance, in my case, the culprit is the zlib1.dll from the Intel wireless software.
E:\samples\sfmlSound>ldd sfmlSound.exe ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffee3e70000) KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffee3030000) ... zlib1.dll => /c/Program Files/Intel/WiFi/bin/zlib1.dll (0x7ffed0f10000) ...
after resolved the conflicts, the program would load correctly.
Answered By - 书呆彭 Answer Checked By - Timothy Miller (WPSolving Admin)