Domanda

I am trying to use zlib functions while working with poco c++ library. Linking to the zlib library directly does not work, because poco links to it also and I get several duplicates while linking. So I removed zlib.lib from my libraries list and used the poco version only.

Because zlib.h is part of poco, compiling works perfectly, but linking now results in the following error

error LNK2019 unresolved external "_gzopen" 

So I can switch between duplicate and unresolved. Who can help me out?

È stato utile?

Soluzione

On windows, defining ZLIB_DLL should force export of native zlib interface. Optionally, Poco InflatingStream and DeflatingStream wrap zlib functionality. A word of warning: these are std streams derivatives and there may be a performance penalty.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top