minizip: linking errors, I think...

Started by
4 comments, last by setaglib 18 years, 10 months ago
Hey all, I'm having trouble getting miniunz to build with zlib when I try to compile I get the following errors:

unresolved external symbol _crc32 referenced in function _unzReadCurrentFile
unresolved external symbol _get_crc_table referenced in function _unzOpenCurrentFile3
unresolved external symbol _inflate referenced in function _unzReadCurrentFile
unresolved external symbol _inflateEnd referenced in function _unzCloseCurrentFile
unresolved external symbol _inflateInit2_ referenced in function _unzOpenCurrentFile3
5 unresolved externals
defaultlib 'LIBC' conflicts with use of other libs; use /NODEFAULTLIB:library


I already linked zlibwapi.lib to the project do I need to link to anything else? And also do I need to define ZLIB_WINAPI if I'm using the static library or is that for the dll only? EDIT: using c++ btw.
Advertisement
It's a linking error. Did you really add it to the project->settings->link editbox? And don't forget to add it for both debug and release mode.
Yeah, I added it to Debug version only though, adding it to release didn't make any difference either. A small correction on my last post I'm linking to to the static library so its zlibstat.lib. I tried linking with the dll but it still gave me the same errors [sad]
I got it to compile now looks like there was something wrong with the paths. Now it compiles. But it spits out unresolved external symbol to any function I try to call [evil]
Unresolved external means eaither something prototyped and not defined, you have externs that arent defined or it cant find whatever your using in the libraries your linking with. (Maybe means other things? I'm no pro...)
Ok, after several hours of pulling my hair out, I got it to work!

It looks like ZLIB_WINAPI needs to be defined for it to link properly. Once I define it everything runs smoothly...

This topic is closed to new replies.

Advertisement