Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Assimp, zlib, and LNK2001 errors


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Rectangle   Members   -  Reputation: 161

Like
0Likes
Like

Posted 02 September 2012 - 06:36 PM

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 _inflateEnd2>assimp.lib(BlenderLoader.obj) : error LNK2001: unresolved external symbol _inflateEnd2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _inflateEnd2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateEnd2>assimp.lib(XGLLoader.obj) : error LNK2001: unresolved external symbol _inflate2>assimp.lib(BlenderLoader.obj) : error LNK2001: unresolved external symbol _inflate2>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _inflate2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflate2>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 _crc322>assimp.lib(unzip.obj) : error LNK2001: unresolved external symbol _get_crc_table2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateSetDictionary2>assimp.lib(XFileParser.obj) : error LNK2001: unresolved external symbol _inflateReset2>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?

Sponsor:

#2 Rectangle   Members   -  Reputation: 161

Like
0Likes
Like

Posted 02 September 2012 - 11:46 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS