nafxcw.lib(afxtoolbar.obj):错误LNK2005 [英] nafxcw.lib(afxtoolbar.obj) : error LNK2005
本文介绍了nafxcw.lib(afxtoolbar.obj):错误LNK2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我想在vs2012中使用这个神奇的工具到我的项目,但是有很多链接错误如下:
我已经删除了CMFCToolBar.cpp从oxlibr.lib中,然后错误将是未解决的外部。
和另一个问题是关于_xGetMonitorInfo,我无法获得msdn中的任何信息,这个函数是由微软还是三十方实现的?
Hello,
I want to use this amazing tool to my project in vs2012, but there are many link errors as follows:
I have removed the CMFCToolBar.cpp out of the oxlibr.lib, then the errors will be unresolved externals.
and another problems is about the _xGetMonitorInfo , I can not get any info in msdn, is this function implemented by Microsoft or thirty party?
1>nafxcw.lib(afxtoolbar.obj) : error LNK2005: "public: __thiscall CMFCToolBar::CMFCToolBar(void)" (??0CMFCToolBar@@QAE@XZ) already defined in oxlibr.lib(MFCToolBar.obj)
1>nafxcw.lib(afxtoolbar.obj) : error LNK2005: "public: virtual __thiscall CMFCToolBar::~CMFCToolBar(void)" (??1CMFCToolBar@@UAE@XZ) already defined in oxlibr.lib(MFCToolBar.obj)
1>nafxcw.lib(afxtoolbar.obj) : error LNK2005: "public: virtual int __thiscall CMFCToolBar::CreateEx(class CWnd *,unsigned long,unsigned long,class CRect,unsigned int)" (?CreateEx@CMFCToolBar@@UAEHPAVCWnd@@KKVCRect@@I@Z) already defined in oxlibr.lib(MFCToolBar.obj)
1>nafxcw.lib(afxtoolbar.obj) : error LNK2005: "protected: virtual struct AFX_MSGMAP const * __thiscall CMFCToolBar::GetMessageMap(void)const " (?GetMessageMap@CMFCToolBar@@MBEPBUAFX_MSGMAP@@XZ) already defined in oxlibr.lib(MFCToolBar.obj)
1>nafxcw.lib(afxtoolbar.obj) : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CMFCToolBar::GetRuntimeClass(void)const " (?GetRuntimeClass@CMFCToolBar@@UBEPAUCRuntimeClass@@XZ) already defined in oxlibr.lib(MFCToolBar.obj)
1>nafxcw.lib(afxtoolbar.obj) : error LNK2005: "protected: static struct AFX_MSGMAP const * __stdcall CMFCToolBar::GetThisMessageMap(void)" (?GetThisMessageMap@CMFCToolBar@@KGPBUAFX_MSGMAP@@XZ) already defined in oxlibr.lib(MFCToolBar.obj)
1>oxlibr.lib(OXBitmapMenu.obj) : error LNK2019: unresolved external symbol _xMonitorFromRect@8 referenced in function "private: static void __cdecl COXBitmapMenu::DeterminePosition(class CMenu *,struct tagRECT const *,unsigned long,class CPoint &,unsigned int &,unsigned int &)" (?DeterminePosition@COXBitmapMenu@@CAXPAVCMenu@@PBUtagRECT@@KAAVCPoint@@AAI3@Z)
1>oxlibr.lib(OXToolTipCtrl.obj) : error LNK2001: unresolved external symbol _xMonitorFromRect@8
1>oxlibr.lib(OXBitmapMenu.obj) : error LNK2019: unresolved external symbol _xGetMonitorInfo@8 referenced in function "private: static void __cdecl COXBitmapMenu::DeterminePosition(class CMenu *,struct tagRECT const *,unsigned long,class CPoint &,unsigned int &,unsigned int &)" (?DeterminePosition@COXBitmapMenu@@CAXPAVCMenu@@PBUtagRECT@@KAAVCPoint@@AAI3@Z)
1>oxlibr.lib(OXToolTipCtrl.obj) : error LNK2001: unresolved external symbol _xGetMonitorInfo@8
推荐答案
Windows API具有 GetMonitorInfo 和MonitorFromRect 。检查xGetMonitorInfo和_xGetMonitorInfo来自的代码。也许这是一个错字或相同的前向声明功能。删除这个假人...
您可以包含代码,而不是链接oxlibr.lib。它导致更好的优化系数。
The Windows API has GetMonitorInfo and MonitorFromRect. Check your code where xGetMonitorInfo adn _xGetMonitorInfo is from. Maybe it is a typo or same forward declared function. Remove this dummies...
Instead of linking the oxlibr.lib you can include the code. It leads to better optimized coe.
这篇关于nafxcw.lib(afxtoolbar.obj):错误LNK2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文