Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 8-Sep-14 21:09pm
v2

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900