Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Linking problems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Linking problems

 Post Reply Post Reply
Author
Message
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post Topic: Linking problems
    Posted: 03 August 2009 at 11:34am
Hello!

I've had CommandBars1200vc80 dynamically linked in my project. Now we want to link MFC statically. After setting /MT flag in our project, we get a ton of linking errors like this:


1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::EnableDocking(void)" (?EnableDocking@CXTPCommandBars@@QAEXXZ) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::SetSite(class CWnd *)" (?SetSite@CXTPCommandBars@@QAEXPAVCWnd@@@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::UpdateCommandBars(void)const " (?UpdateCommandBars@CXTPCommandBars@@QBEXXZ) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: int __thiscall CXTPCommandBars::OnFrameWndMsg(unsigned int,unsigned int,long,long *)" (?OnFrameWndMsg@CXTPCommandBars@@QAEHIIJPAJ@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::SetQuickCustomizeMode(int)" (?SetQuickCustomizeMode@CXTPCommandBars@@QAEXH@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::SetCustomizeMode(int)" (?SetCustomizeMode@CXTPCommandBars@@QAEXH@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::SetPaintManager(class CXTPPaintManager *)" (?SetPaintManager@CXTPCommandBars@@QAEXPAVCXTPPaintManager@@@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: void __thiscall CXTPCommandBars::SetTheme(enum XTPPaintTheme)" (?SetTheme@CXTPCommandBars@@QAEXW4XTPPaintTheme@@@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: class CXTPToolBar * __thiscall CXTPCommandBars::Add(char const *,enum XTPBarPosition,struct CRuntimeClass *)" (?Add@CXTPCommandBars@@QAEPAVCXTPToolBar@@PBDW4XTPBarPosition@@PAUCRuntimeClass@@@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPCommandBars.obj) : error LNK2005: "public: int __thiscall CXTPCommandBars::PreTranslateFrameMessage(struct tagMSG *)" (?PreTranslateFrameMessage@CXTPCommandBars@@QAEHPAUtagMSG@@@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPPaintManager.obj) : error LNK2005: "public: virtual void __thiscall CXTPPaintManager::UpdateColors(void)" (?UpdateColors@CXTPPaintManager@@UAEXXZ) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPPaintManager.obj) : error LNK2005: "public: virtual int __thiscall CXTPPaintManager::GetPopupBarGripperWidth(class CXTPCommandBar *)" (?GetPopupBarGripperWidth@CXTPPaintManager@@UAEHPAVCXTPCommandBar@@@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)
1>CommandBars1200vc80S.lib(XTPPaintManager.obj) : error LNK2005: "public: virtual class CFont * __thiscall CXTPPaintManager::GetCommandBarFont(class CXTPCommandBar *,int)" (?GetCommandBarFont@CXTPPaintManager@@UAEPAVCFont@@PAVCXTPCommandBar@@H@Z) already defined in CommandBars1200vc80.lib(CommandBars1200vc80.dll)


Any idea what is wrong and how can i change it?

Thanks,

Bojan Hrnkas
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1212
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2009 at 11:50am
Did you clean and rebuild the whole project?

Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1212
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2009 at 11:52am
Another hint;
Check your linker dependencies. Perhaps you forgot to remove a manually added dependency for
CommandBars1200vc80.lib
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2009 at 11:53am
Ok, forget it. I still had CommandBars1200vc80.lib in the include libraries option in linker.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.529 seconds.