Advertisement Jump to content
Sign in to follow this  
Rectangle

Assimp, zlib, and LNK2001 errors

This topic is 2329 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Using MSVC 2010 I have set both zlib and assimp to static libs, which use the Multi-threaded DLL (/MD) option, as to avoid any extra DLL dependency issues. They both compile without error or warning. But when I try to link my project against assimp.lib, I get the following output:
[source lang="cpp"]2>assimp.lib(XGLLoader.obj) : error LNK2001: unresolved external symbol _inflateEnd
2>assimp.lib(BlenderLoader.obj) : error LNK2001: unresolved external symbol _inflateEnd
2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _inflateEnd
2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateEnd
2>assimp.lib(XGLLoader.obj) : error LNK2001: unresolved external symbol _inflate
2>assimp.lib(BlenderLoader.obj) : error LNK2001: unresolved external symbol _inflate
2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _inflate
2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflate
2>assimp.lib(XGLLoader.obj) : error LNK2001: unresolved external symbol _inflateInit2_
2>assimp.lib(BlenderLoader.obj) : error LNK2001: unresolved external symbol _inflateInit2_
2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _inflateInit2_
2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateInit2_
2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _crc32
2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _get_crc_table
2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateSetDictionary
2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateReset
2>C:\pathto\myproject.exe : fatal error LNK1120: 7 unresolved externals[/source]
I have tried removing the ZLIB_WINAPI flag from the zlib project, and I still get these errors. I have even tried linking my project to zlib.lib, adding these functions to assimp's "General -> Librarian -> Exported Name Functions" list, and still no dice. Does anyone know how to solve this?

Share this post


Link to post
Share on other sites
Advertisement
Well, after I added the same preprocessor flags that zlib uses into Assimp's project settings, and changed all "extern" keywords in unzip.h and unzip.c to "ZEXTERN", the errors disappeared.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!