error LNK2019: unresolved external symbol "public: referenced in function LNK1120: 6 unresolved externals错误解决办法

来源:互联网 发布:公共基础知识软件下载 编辑:程序博客网 时间:2024/05/19 22:06

  这几天在vs2005环境下,基于wince编程,工程在链接时出现错误

1>------ Build started: Project: MotorTest3, Configuration: Release Pocket PC 2003 (ARMV4) ------
1>Linking...
1>Gif.obj : error LNK2019: unresolved external symbol "public: void __cdecl CGif89a::close(void)" (?close@CGif89a@@QAAXXZ) referenced in function "void * __cdecl LoadGif(wchar_t const *,int)" (?LoadGif@@YAPAXPB_WH@Z)
1>Gif.obj : error LNK2019: unresolved external symbol "public: struct FRAME const * __cdecl CGif89a::getNextFrame(void)" (?getNextFrame@CGif89a@@QAAPBUFRAME@@XZ) referenced in function "void * __cdecl LoadGif(wchar_t const *,int)" (?LoadGif@@YAPAXPB_WH@Z)
1>Gif.obj : error LNK2019: unresolved external symbol "public: struct GLOBAL_INFO const * __cdecl CGif89a::getGlobalInfo(void)" (?getGlobalInfo@CGif89a@@QAAPBUGLOBAL_INFO@@XZ) referenced in function "void * __cdecl LoadGif(wchar_t const *,int)" (?LoadGif@@YAPAXPB_WH@Z)
1>Gif.obj : error LNK2019: unresolved external symbol "public: __cdecl CGif89a::~CGif89a(void)" (??1CGif89a@@QAA@XZ) referenced in function "void * __cdecl LoadGif(wchar_t const *,int)" (?LoadGif@@YAPAXPB_WH@Z)
1>Gif.obj : error LNK2019: unresolved external symbol "public: int __cdecl CGif89a::operator!(void)" (??7CGif89a@@QAAHXZ) referenced in function "void * __cdecl LoadGif(wchar_t const *,int)" (?LoadGif@@YAPAXPB_WH@Z)
1>Gif.obj : error LNK2019: unresolved external symbol "public: __cdecl CGif89a::CGif89a(wchar_t const *,int)" (??0CGif89a@@QAA@PB_WH@Z) referenced in function "void * __cdecl LoadGif(wchar_t const *,int)" (?LoadGif@@YAPAXPB_WH@Z)
1>Pocket PC 2003 (ARMV4)/Release/MotorTest3.exe : fatal error LNK1120: 6 unresolved externals
1>Build log was saved at "file://d:/armPro/MotorTest3/MotorTest3/Pocket PC 2003 (ARMV4)/Release/BuildLog.htm"
1>MotorTest3 - 7 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

,上网查了好长时间,才找到原来是文件没有加载到工程里,在文件上,右键,点击“properties”,在出现的工作区中“include in progject”选择"TURE",重新编译工程,问题解决。