Sign in to follow this  
setaglib

minizip: linking errors, I think...

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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...)

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this