在cocos2dx中的unzip类中调用函数时未解决的外部符号错误

时间:2013-10-24 07:38:06

标签: c++ windows cocos2d-x

我在调用unzip类中的函数时构建我的cocos2d-x win32项目时遇到链接器错误。

   1>ZipArchive.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void * __cdecl cocos2d::unzOpen(char const *)" (__imp_?unzOpen@cocos2d@@YAPAXPBD@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGetGlobalInfo(void *,struct cocos2d::unz_global_info_s *)" (__imp_?unzGetGlobalInfo@cocos2d@@YAHPAXPAUunz_global_info_s@1@@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipOpenFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?UnzipOpenFile@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzReadCurrentFile(void *,void *,unsigned int)" (__imp_?unzReadCurrentFile@cocos2d@@YAHPAX0I@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGoToNextFile(void *)" (__imp_?unzGoToNextFile@cocos2d@@YAHPAX@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGetCurrentFileInfo(void *,struct cocos2d::unz_file_info_s *,char *,unsigned long,void *,unsigned long,char *,unsigned long)" (__imp_?unzGetCurrentFileInfo@cocos2d@@YAHPAXPAUunz_file_info_s@1@PADK0K2K@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzOpenCurrentFilePassword(void *,char const *)" (__imp_?unzOpenCurrentFilePassword@cocos2d@@YAHPAXPBD@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzOpenCurrentFile(void *)" (__imp_?unzOpenCurrentFile@cocos2d@@YAHPAX@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGoToFirstFile(void *)" (__imp_?unzGoToFirstFile@cocos2d@@YAHPAX@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo@ZipArchive@myproject@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzClose(void *)" (__imp_?unzClose@cocos2d@@YAHPAX@Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipCloseFile(void)" (?UnzipCloseFile@ZipArchive@myproject@@QAE_NXZ)

我将libzlib.lib添加到我的附加依赖项中,但它仍然给我错误。我正在使用VS2010

0 个答案:

没有答案