문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top