Using zlib in Visual C++ project

一世执手 提交于 2019-12-25 02:29:44

问题


I've been struggling to compile my Visual C++ 2010 project with dependency of Zlib. I've got source code that worked on Linux and Mac OS X. Here's, where I have linker errors:

error LNK2019: unresolved external symbol _inflate@8 referenced in function...
error LNK2019: unresolved external symbol _inflateInit2_@16 referenced in function...
error LNK2019: unresolved external symbol _deflate@8 referenced in function...
error LNK2019: unresolved external symbol _deflateInit2_@32 referenced in function...

I've been finding solution for few days now, trying compiling Zlib different ways, but it is clear that I've missed something. Very similar question has been answered here, but not clearly enough for amateur like me. I would need step-by-step guide how to get it to work.

Thank you in advance.


回答1:


If you have static libraries after building the Zlib, point them in your project at this location.Project properties -> Linker -> Input -> Additional dependencies. Give the absolute path.



来源:https://stackoverflow.com/questions/23616860/using-zlib-in-visual-c-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!