title: Execution impossible on w10 with a cross compiled libpng16-16.dll
body: <p>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).</p>
  
  <p>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:</p>
  
  <blockquote>
    <p>The procedure entry point inflateValidate could not be located in the dynamic link library D:\libpng16-16.dll.</p>
  </blockquote>
  
  <p>libpng16-16.dll is there, and when I objectdump it (in linux):</p>
  
  <blockquote>
    <p>objdump -x libpng16-16.dll | grep inflate</p>
  </blockquote>
  
  <pre><code>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_
  </code></pre>
  
  <p>So apparently the symbol __imp_inflateValidate is present, so is there something I'm missing ? And does anybody know how to fix this ?</p>
  
  <p>Thanks in advance</p>