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.
Poco / zlib: error LNK2019 unresolved external "_gzopen"
-
11-04-2022 - |
Question
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?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow