Print Page | Close Window

CXTPListCtrl derived class

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=24193
Printed Date: 02 May 2024 at 8:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPListCtrl derived class
Posted By: angelsoriasanagustin
Subject: CXTPListCtrl derived class
Date 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.




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



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