Print Page | Close Window

Linker error for CSingleWorkspace

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6299
Printed Date: 26 April 2024 at 1:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Linker error for CSingleWorkspace
Posted By: RichardPreen
Subject: Linker error for CSingleWorkspace
Date 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 " ( mailto:?GetItemText@CXTPTabClientWnd@@MBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCWnd@@@Z - ?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 " ( mailto:?GetItemTooltip@CXTPTabClientWnd@@MBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCXTPTabManagerItem@@@Z - ?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 " ( mailto:?GetItemCaption@CXTPTabManager@@UBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCXTPTabManagerItem@@@Z - ?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 " ( mailto:?GetItemTooltip@CWorkspace@CXTPTabClientWnd@@MBE?AV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@PBVCXTPTabManagerItem@@@Z - ?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?




Replies:
Posted By: Oleg
Date 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


Posted By: RichardPreen
Date 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?


Posted By: RichardPreen
Date 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.


Posted By: RichardPreen
Date Posted: 02 February 2007 at 2:17am
sorted, cleaned and rebuild, looks ok now, thanks for pointing me in the right direction.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net