error LNK2019 :无法解析的外部符号

luyulong8 2012-03-28 02:19:44
>FileViewBar.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static struct CRuntimeClass * __stdcall CCJExplorerBar::GetThisClass(void)" (__imp_?GetThisClass@CCJExplorerBar@@SGPAUCRuntimeClass@@XZ),该符号在函数 "protected: static struct CRuntimeClass * __stdcall CFileViewBar::_GetBaseClass(void)" (?_GetBaseClass@CFileViewBar@@KGPAUCRuntimeClass@@XZ) 中被引用
1>FileViewBar.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) protected: static struct AFX_MSGMAP const * __stdcall CCJExplorerBar::GetThisMessageMap(void)" (__imp_?GetThisMessageMap@CCJExplorerBar@@KGPBUAFX_MSGMAP@@XZ),该符号在函数 "protected: static struct AFX_MSGMAP const * __stdcall CFileViewBar::GetThisMessageMap(void)" (?GetThisMessageMap@CFileViewBar@@KGPBUAFX_MSGMAP@@XZ) 中被引用
1>FileViewBar.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall CShellTree::OnFolderSelected(struct tagNMHDR *,long *,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > &)" (__imp_?OnFolderSelected@CShellTree@@QAEHPAUtagNMHDR@@PAJAAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z),该符号在函数 "protected: void __thiscall CFileViewBar::OnSelchanged(struct tagNMHDR *,long *)" (?OnSelchanged@CFileViewBar@@IAEXPAUtagNMHDR@@PAJ@Z) 中被引用
1>ImageDBDoc.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall CADORecordset::GetFieldValue(char const *,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > &,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >)" (__imp_?GetFieldValue@CADORecordset@@QAEHPBDAAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@V23@@Z),该符号在函数 "public: static unsigned int __cdecl CImageDBDoc::Thread_GetAllOutContourChar(void *)" (?Thread_GetAllOutContourChar@CImageDBDoc@@SAIPAX@Z) 中被引用
1>LogoImageDB.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall CADORecordset::SetFieldValue(char const *,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >)" (__imp_?SetFieldValue@CADORecordset@@QAEHPBDV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z),该符号在函数 "public: int __thiscall CLogoImageDB::AddImageClass(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >,int,class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >)" (?AddImageClass@CLogoImageDB@@QAEHV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H0@Z) 中被引用
1>MainFrm.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static struct CRuntimeClass * __stdcall CCJFrameWnd::GetThisClass(void)" (__imp_?GetThisClass@CCJFrameWnd@@SGPAUCRuntimeClass@@XZ),该符号在函数 "protected: static struct CRuntimeClass * __stdcall CMainFrame::_GetBaseClass(void)" (?_GetBaseClass@CMainFrame@@KGPAUCRuntimeClass@@XZ) 中被引用
1>MainFrm.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) protected: static struct AFX_MSGMAP const * __stdcall CCJFrameWnd::GetThisMessageMap(void)" (__imp_?GetThisMessageMap@CCJFrameWnd@@KGPBUAFX_MSGMAP@@XZ),该符号在函数 "protected: static struct AFX_MSGMAP const * __stdcall CMainFrame::GetThisMessageMap(void)" (?GetThisMessageMap@CMainFrame@@KGPBUAFX_MSGMAP@@XZ) 中被引用
1>..\bin\ImageDB.exe : fatal error LNK1120: 7 个无法解析的外部命令
1>正在创建浏览信息文件...
1>Microsoft 浏览信息维护实用工具 Version 9.00.21022
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>生成日志保存在“file://d:。。。。。。。。\Debug\BuildLog.htm”
1>ImageDB - 8 个错误,0 个警告


应该添加什么库呢?这上面说的是什么符号被引用了??
...全文
4607 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
梦境传说 2012-05-07
  • 打赏
  • 举报
回复
我现在就碰到楼主的问题,但是用1楼的方法不行。本来设置的就是_windows


+++
luyulong8 2012-03-29
  • 打赏
  • 举报
回复
我本来那边就是设置的_windows
[Quote=引用 1 楼 的回复:]

1.进入project->setting->c/c++, 在category中选择preprocessor,在processor definitions中删除_CONSOLE, 添加_WINDOWS
2.进入project->setting->Link, 在Project options中将 /subsystem:console改为/subsystem:windows.
[/Quote]
luyulong8 2012-03-29
  • 打赏
  • 举报
回复
怎么查看缺少了哪个.lib呢,纠结了好久都没搞出来~
[Quote=引用 3 楼 的回复:]

这种错误要么是缺少头文件,要么是缺少.lib文件。
缺少头文件直接引用,缺少.lib文件在工程设置里面添加。
[/Quote]
fishjam 2012-03-28
  • 打赏
  • 举报
回复
http://blog.csdn.net/chief1985/article/details/4734770
Steward2011 2012-03-28
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]
这种错误要么是缺少头文件,要么是缺少.lib文件。
缺少头文件直接引用,缺少.lib文件在工程设置里面添加。
[/Quote]

Up
DavidHsing 2012-03-28
  • 打赏
  • 举报
回复
1楼3楼都说了,闪人
hawkddg51 2012-03-28
  • 打赏
  • 举报
回复
这种错误要么是缺少头文件,要么是缺少.lib文件。
缺少头文件直接引用,缺少.lib文件在工程设置里面添加。
izardMan 2012-03-28
  • 打赏
  • 举报
回复
缺少lib文件
guyuexuangyx 2012-03-28
  • 打赏
  • 举报
回复
1.进入project->setting->c/c++, 在category中选择preprocessor,在processor definitions中删除_CONSOLE, 添加_WINDOWS
2.进入project->setting->Link, 在Project options中将 /subsystem:console改为/subsystem:windows.

16,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧