Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Linker error for CSingleWorkspace
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Linker error for CSingleWorkspace

 Post Reply Post Reply
Author
Message
RichardPreen View Drop Down
Newbie
Newbie


Joined: 01 February 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RichardPreen Quote  Post ReplyReply Direct Link To This Post Topic: Linker error for CSingleWorkspace
    Posted: 01 February 2007 at 4:25pm

I need to provide my own implementation for CSingleWorkspace. With the following code;

#define _XTP_STATICLINK
#include "XTCommandBarsPro.h"

class CMyTabClientWnd : public CXTPTabClientWnd
{
public:
     class CMyWorkspace : public CXTPTabClientWnd::CSingleWorkspace
     {};

public:
     virtual CWorkspace* CreateWorkspace()
     {
          return new CMyWorkspace();
     }
};

I get the following 4 linker errors;

MyTabClientWnd.obj : error LNK2001: unresolved external symbol "protected: virtual class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall CXTPTabClientWnd::GetItemText(class CWnd const *)const " (?GetItemText@CXTPTabClientWnd@@MBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCWnd@@@Z)

MyTabClientWnd.obj : error LNK2001: unresolved external symbol "protected: virtual class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall CXTPTabClientWnd::GetItemTooltip(class CXTPTabManagerItem const *)const " (?GetItemTooltip@CXTPTabClientWnd@@MBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCXTPTabManagerItem@@@Z)
MyTabClientWnd.obj : error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall CXTPTabManager::GetItemCaption(class CXTPTabManagerItem const *)const " (?GetItemCaption@CXTPTabManager@@UBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCXTPTabManagerItem@@@Z)
MyTabClientWnd.obj : error LNK2001: unresolved external symbol "protected: virtual class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall CXTPTabClientWnd::CWorkspace::GetItemTooltip(class CXTPTabManagerItem const *)const " (?GetItemTooltip@CWorkspace@CXTPTabClientWnd@@MBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCXTPTabManagerItem@@@Z)

Using MFC in a shared DLL, and linking to CodeJock as a static lib. Any ideas how to resolve this?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2007 at 1:05am
Hi,
 
Again looks like tchar_t option problem.
 
Check that option
Configuration Properties->C/C++->Language->Treat wchar_t as Builtin Type
 Is "Yes"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
RichardPreen View Drop Down
Newbie
Newbie


Joined: 01 February 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RichardPreen Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2007 at 1:40am

My application needs "Treat wchar_t as Builtin Type" to be No.

What other alternatives do I have?
Back to Top
RichardPreen View Drop Down
Newbie
Newbie


Joined: 01 February 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RichardPreen Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2007 at 2:12am
I just tried setting all "Treat wchar_t as Builtin Type" within CommandBarsStatic_vc80.vcproj to No, but that just generated me a lot of other errors instead.
Back to Top
RichardPreen View Drop Down
Newbie
Newbie


Joined: 01 February 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote RichardPreen Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2007 at 2:17am
sorted, cleaned and rebuild, looks ok now, thanks for pointing me in the right direction.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.063 seconds.