My program (VS 2010) uses Google Buffer Protocol compiled with HAVE_ZLIB
option enabled. I compiled the latest version of zlib
and added .lib
in my project, but during linking i still got
1>libprotobuf.lib(gzip_stream.obj) : error LNK2001: unresolved external symbol _inflateEnd 1>libprotobuf.lib(gzip_stream.obj) : error LNK2001: unresolved external symbol inflateInit2 1>libprotobuf.lib(gzip_stream.obj) : error LNK2001: unresolved external symbol _inflate 1>libprotobuf.lib(gzip_stream.obj) : error LNK2001: unresolved external symbol deflateInit2 1>libprotobuf.lib(gzip_stream.obj) : error LNK2001: unresolved external symbol _deflate 1>libprotobuf.lib(gzip_stream.obj) : error LNK2001: unresolved external symbol _deflateEnd
I used dumpbin.exe /all zlib.lib
, it says:
File Type: LIBRARY
.... 245 public symbols .... 4DBE __imp__inflateInit2_@16 4DBE _inflateInit2_@16
also there are other unresolved symbols in this list.
What's wrong then? Why does the linker can't find these functions?
upd: after recompiling zlib
now it's __imp__inflateInit2_@4