Note that there are some explanatory texts on larger screens.

plurals
  1. POSkipping incompatible zlib dll
    primarykey
    data
    text
    <p><strong>Situation:</strong> I have many gzipped input files that I want to process in a c program. I can extract each of them each time i need them but this takes a lot of time, so I would like to use in memory extraction. As a test case i downloaded the zlib sources from <a href="http://zlib.net/" rel="nofollow noreferrer">http://zlib.net/</a> and tried to compile the example zpipe.c</p> <p><strong>Problem:</strong> When I compile zpipe.c using:</p> <pre><code>x86_64-w64-mingw32-gcc -Wall -O3 zpipe.c -o zpipe -L. -lzlib1 </code></pre> <p>I get the error:</p> <pre><code>x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ./zlib1.dll when searching for -lzlib1 x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzlib1 </code></pre> <p><strong>What I think is the problem</strong> (I got this from <a href="https://stackoverflow.com/questions/3550571/skipping-incompatible-error-when-linking">Skipping incompatible error when linking</a>)</p> <p>I try to link a 32 bit dll while I compile in 64 bit code. When i look at <a href="http://zlib.net/zlib_faq.html#faq26" rel="nofollow noreferrer">http://zlib.net/zlib_faq.html#faq26</a> it is said that zlib is tested on 64 bit machines, but I guess this means you still compile 32 bit code. Note that I compile zpipe.c (provided in the zlib source), so i'm sure the inclusions are all ok. I put the zlib1.dll in the compilation directory.</p> <p><strong>What did I do/find:</strong> Among others I found 2 good examples (however with both of them I have the problem described above)</p> <ul> <li><a href="http://www.codeguru.com/cpp/cpp/algorithms/compression/article.php/c11735" rel="nofollow noreferrer">http://www.codeguru.com/cpp/cpp/algorithms/compression/article.php/c11735</a></li> <li><a href="http://bobobobo.wordpress.com/2008/02/23/how-to-use-zlib/" rel="nofollow noreferrer">http://bobobobo.wordpress.com/2008/02/23/how-to-use-zlib/</a></li> </ul> <p>And I looked at other questions, such as:</p> <ul> <li><a href="https://stackoverflow.com/questions/3254675/trying-to-compile-program-that-uses-zlib-link-unresolved-error">Trying to compile program that uses zlib. Link unresolved error</a></li> <li><a href="https://stackoverflow.com/questions/3119714/skipping-incompatible-libraries-at-compile">Skipping Incompatible Libraries at compile</a></li> </ul> <p>I also build a dll myself in vc 2010, however, all project configurations in the zlib 1.26 source are for a 32 bit configuration. So after I build a dll, I have the same error as above.</p> <p>A long story so a <strong>quick summary of my questions</strong>:</p> <ol> <li>Is there something I do wrong during compilation?</li> <li>Is it correct that I will never be able to use the zlib1 dll when I compile in 64 bit?</li> <li>And most important: Can I somehow compile a 64 bit version of zlib myself (using for example these <a href="http://msdn.microsoft.com/en-us/library/9yb4317s.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/9yb4317s.aspx</a> instructions), or are these already available somewhere (I was not able to find these until now)?</li> </ol> <p>Thank you all for your time!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload