Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPListCtrl derived class
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPListCtrl derived class

 Post Reply Post Reply
Author
Message
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Topic: CXTPListCtrl derived class
    Posted: 18 August 2021 at 5:24am
Hi.

When I try to create a derived class:

class CXTPListCtrl2 : public CXTPListCtrl
{
public:
CXTPListCtrl2() {};
};

I get two link errors:
( I'm using 20.0 version )

1>Controls2000vc160x64DSUD.lib(XTPListBase.obj) : error LNK2005: already defined "public: virtual void __cdecl CXTPListBase::SetExtendedStyle(unsigned long)" (?SetExtendedStyle@CXTPListBase@@UEAAXK@Z) en RecepcionDlg.obj
1>Controls2000vc160x64DSUD.lib(XTPListBase.obj) : error LNK2005: already defined "public: virtual unsigned long __cdecl CXTPListBase::GetExtendedStyle(void)" (?GetExtendedStyle@CXTPListBase@@UEAAKXZ) en RecepcionDlg.obj

How can I fix it ?

Thanks.

Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2021 at 5:57am
Hello again....

The problem was static linking to XTControls and XTSkinFramework. If I undefined _XTP_STATICLINK, there is no error.

#define _XTP_STATICLINK
#include <XTControls.h>   // Codejock Software Components
#include <XTSkinFrameworkBundle.h>   // Codejock Software Components

How can I link statically to both libraries ?

Thanks
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.