Trying to compile program that uses zlib. Link unresolved error

青春壹個敷衍的年華 提交于 2019-12-24 06:45:17

问题


While trying to compile program, that uses zlib, i got following errors:

Error 1 error LNK2019: unresolved external symbol _compress referenced in function "void __cdecl save_image_in_pakfile(class std::basic_ofstream > &,struct _IplImage *)" (?save_image_in_pakfile@@YAXAAV?$basic_ofstream@DU?$char_traits@D@std@@@std@@PAU_IplImage@@@Z) buffer_management.obj

Error 2 error LNK2001: unresolved external symbol _compress fern_based_point_classifier.obj

And two more same errors but related to uncompress function.

I use the vs2008 C++, and at the project properties I added in C/C++ : Additional include directories the path to header files of zlib. And at linker properties I added at additional dependencies: zlibwapi.lib and zlibstat.lib files.

How to resolv the problem? If I made some mistakes please show me them..

来源:https://stackoverflow.com/questions/3254675/trying-to-compile-program-that-uses-zlib-link-unresolved-error

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