从VC6到VS2005的问题

Li_Carey 2012-03-19 04:49:02
我的工程在VC6下很正常,导入vs2005编译通过,出现了好多链接错误,大虾们帮看看啊...................





1>------ 已启动生成: 项目: TBSLineStat, 配置: Release Win32 ------
1>正在链接...
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : warning LNK4075: 忽略“/EDITANDCONTINUE”(由于“/INCREMENTAL:NO”规范)
1>.\TBSLineStat.def : warning LNK4222: 不应为导出符号“DllCanUnloadNow”分配序号
1>.\TBSLineStat.def : warning LNK4222: 不应为导出符号“DllGetClassObject”分配序号
1>.\TBSLineStat.def : warning LNK4222: 不应为导出符号“DllRegisterServer”分配序号
1>.\TBSLineStat.def : warning LNK4222: 不应为导出符号“DllUnregisterServer”分配序号
1> 正在创建库 .\Release/TBSLineStat.lib 和对象 .\Release/TBSLineStat.exp
1>LINK : warning LNK4098: 默认库“mfc80d.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>LINK : warning LNK4098: 默认库“mfcs80d.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>LINK : warning LNK4098: 默认库“msvcrtd.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>LeftView.obj : error LNK2001: 无法解析的外部符号 _dbManage
1>RightView.obj : error LNK2001: 无法解析的外部符号 _dbManage
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : error LNK2019: 无法解析的外部符号 "public: int __thiscall CRect::IntersectRect(struct tagRECT const *,struct tagRECT const *)" (?IntersectRect@CRect@@QAEHPBUtagRECT@@0@Z),该符号在函数 "protected: void __thiscall CDPSGridCtrl::EraseBkgnd(class CDC *)" (?EraseBkgnd@CDPSGridCtrl@@IAEXPAVCDC@@@Z) 中被引用
1>TbsGridCtrl.lib(GridCtrl.obj) : error LNK2001: 无法解析的外部符号 "public: int __thiscall CRect::IntersectRect(struct tagRECT const *,struct tagRECT const *)" (?IntersectRect@CRect@@QAEHPBUtagRECT@@0@Z)
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : error LNK2001: 无法解析的外部符号 "public: static class ATL::CTrace ATL::CTrace::s_trace" (?s_trace@CTrace@ATL@@2V12@A)
1>TbsGridCtrl.lib(GridCtrl.obj) : error LNK2019: 无法解析的外部符号 "public: static class ATL::CTrace ATL::CTrace::s_trace" (?s_trace@CTrace@ATL@@2V12@A),该符号在函数 "public: class CGridCellBase * __thiscall CGridCtrl::GetCell(int,int)const " (?GetCell@CGridCtrl@@QBEPAVCGridCellBase@@HH@Z) 中被引用
1>TbsGridCtrl.lib(DPSGridCellBase.obj) : error LNK2001: 无法解析的外部符号 "public: static class ATL::CTrace ATL::CTrace::s_trace" (?s_trace@CTrace@ATL@@2V12@A)
1>TbsGridCtrl.lib(GridCellBase.obj) : error LNK2001: 无法解析的外部符号 "public: static class ATL::CTrace ATL::CTrace::s_trace" (?s_trace@CTrace@ATL@@2V12@A)
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : error LNK2001: 无法解析的外部符号 "class ATL::CTraceCategory ATL::atlTraceGeneral" (?atlTraceGeneral@ATL@@3VCTraceCategory@1@A)
1>TbsGridCtrl.lib(GridCtrl.obj) : error LNK2001: 无法解析的外部符号 "class ATL::CTraceCategory ATL::atlTraceGeneral" (?atlTraceGeneral@ATL@@3VCTraceCategory@1@A)
1>TbsGridCtrl.lib(DPSGridCellBase.obj) : error LNK2001: 无法解析的外部符号 "class ATL::CTraceCategory ATL::atlTraceGeneral" (?atlTraceGeneral@ATL@@3VCTraceCategory@1@A)
1>TbsGridCtrl.lib(GridCellBase.obj) : error LNK2001: 无法解析的外部符号 "class ATL::CTraceCategory ATL::atlTraceGeneral" (?atlTraceGeneral@ATL@@3VCTraceCategory@1@A)
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall CPoint::operator-=(struct tagPOINT)" (??ZCPoint@@QAEXUtagPOINT@@@Z),该符号在函数 "protected: class CPoint __thiscall CDPSGridCtrl::GetPointClicked(int,int,class CPoint const &)" (?GetPointClicked@CDPSGridCtrl@@IAE?AVCPoint@@HHABV2@@Z) 中被引用
1>TbsGridCtrl.lib(GridCtrl.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall CPoint::operator-=(struct tagPOINT)" (??ZCPoint@@QAEXUtagPOINT@@@Z)
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : error LNK2019: 无法解析的外部符号 "public: int __thiscall CPoint::operator!=(struct tagPOINT)const " (??9CPoint@@QBEHUtagPOINT@@@Z),该符号在函数 "protected: void __thiscall CDPSGridCtrl::OnLButtonUp(unsigned int,class CPoint)" (?OnLButtonUp@CDPSGridCtrl@@IAEXIVCPoint@@@Z) 中被引用
1>TbsGridCtrl.lib(GridCtrl.obj) : error LNK2001: 无法解析的外部符号 "public: int __thiscall CPoint::operator!=(struct tagPOINT)const " (??9CPoint@@QBEHUtagPOINT@@@Z)
1>TbsGridCtrl.lib(DPSGridCtrl.obj) : error LNK2001: 无法解析的外部符号 "class ATL::CTraceCategory ATL::atlTraceException" (?atlTraceException@ATL@@3VCTraceCategory@1@A)
1>TbsGridCtrl.lib(GridCtrl.obj) : error LNK2001: 无法解析的外部符号 "class ATL::CTraceCategory ATL::atlTraceException" (?atlTraceException@ATL@@3VCTraceCategory@1@A)
1>TbsGridCtrl.lib(TitleTip.obj) : error LNK2019: 无法解析的外部符号 "public: __thiscall CRect::CRect(struct tagRECT const *)" (??0CRect@@QAE@PBUtagRECT@@@Z),该符号在函数 "public: void __thiscall CTitleTip::Show(class CRect,char const *,int,struct tagRECT *,struct tagLOGFONTA const *,unsigned long,unsigned long)" (?Show@CTitleTip@@QAEXVCRect@@PBDHPAUtagRECT@@PBUtagLOGFONTA@@KK@Z) 中被引用
1>TbsGridCtrl.lib(DPSGridCellBase.obj) : error LNK2019: 无法解析的外部符号 "public: class CPoint & __thiscall CRect::TopLeft(void)" (?TopLeft@CRect@@QAEAAVCPoint@@XZ),该符号在函数 __catch$?Draw@CDPSGridCellBase@@UAEHPAVCDC@@HHVCRect@@H@Z$0 中被引用
1>TbsGridCtrl.lib(GridCellBase.obj) : error LNK2001: 无法解析的外部符号 "public: class CPoint & __thiscall CRect::TopLeft(void)" (?TopLeft@CRect@@QAEAAVCPoint@@XZ)
1>TbsGridCtrl.lib(DPSGridCellBase.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall CSize::operator+=(struct tagSIZE)" (??YCSize@@QAEXUtagSIZE@@@Z),该符号在函数 "public: virtual class CSize __thiscall CDPSGridCellBase::GetTextExtent(char const *,class CDC *)" (?GetTextExtent@CDPSGridCellBase@@UAE?AVCSize@@PBDPAVCDC@@@Z) 中被引用
1>TbsGridCtrl.lib(GridCellBase.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall CSize::operator+=(struct tagSIZE)" (??YCSize@@QAEXUtagSIZE@@@Z)
1>D:\tbsSoft\TBSDPS\DPSManage\TBSLineStat.ocx : fatal error LNK1120: 10 个无法解析的外部命令
1>生成日志保存在“file://d:\jxq_src\TBSDPS\manager\TBSLineStat\Release\BuildLog.htm”
1>TBSLineStat - 24 个错误,8 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
...全文
254 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
应该是缺lib库
hdg3707 2012-03-19
  • 打赏
  • 举报
回复
看提示应该是两个工程同时在编绎,而且一个工程是给另一个工程生成DLL和LIB文件的,也就是应该先编绎这个DLL的工程,然后再编绎第二个工程,这样第二个工程就可以引用前一个工程生成的DLL和LIB.
你看看是不是编绎顺序不对,你改一下编绎顺序,先编绎DLL的工程,然后再编绎另一个工程
Kaile 2012-03-19
  • 打赏
  • 举报
回复
提示就是error LNK2001: 无法解析的外部符号
Li_Carey 2012-03-19
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 kaile 的回复:]
_dbManage

可能是没有导入某个lib
[/Quote]
不会吧,我是从VC6下导进来的,在VC6下是没有问题的,该加的库我都加进来了,再说,缺少库文件的话,应该是提示的吧.....
Kaile 2012-03-19
  • 打赏
  • 举报
回复
_dbManage

可能是没有导入某个lib
Li_Carey 2012-03-19
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 superly 的回复:]
Release Win32 环境下生成,应该不需要导入:mfc80d.lib之类的debug库,肯定哪里设置错了。
看看菜单→项目→配置属性→C++→代码生成→运行时库,是不是选择的多线程 或 多线程DLL,不要选调试。
[/Quote]现在好了,就剩两个了:
1>LeftView.obj : error LNK2001: 无法解析的外部符号 _dbManage
1>RightView.obj : error LNK2001: 无法解析的外部符号 _dbManage
是在不知道是什么......
lgstudyvc 2012-03-19
  • 打赏
  • 举报
回复
正常,一个个改
SuperLy 2012-03-19
  • 打赏
  • 举报
回复
Release Win32 环境下生成,应该不需要导入:mfc80d.lib之类的debug库,肯定哪里设置错了。
看看菜单→项目→配置属性→C++→代码生成→运行时库,是不是选择的多线程 或 多线程DLL,不要选调试。

16,471

社区成员

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

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

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