Error when used in combination with XTP |
Post Reply |
Author | |
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
Posted: 18 May 2005 at 6:20am |
Hello,
yesterday I downloaded the Calendar component and now I am trying to implement it
in our existing piece of software which now also support the XTreme Toolkit Pro.
Now I want to use the calendar component with the toolkit but I get a bunch
of linker errors:
Generating Code...
Linking... LINK : warning LNK4108: /ALIGN specified without /DRIVER or /VXD; image may not run XCP9700BetaLibDynStatic.lib(XTPCalendarPaintManager.obj) : error LNK2005: "public: __thiscall CXTPPaintManagerColor::operator unsigned long(void)" (??BCXTPPaintManagerColor@@QAEKXZ) already defined in XTP9601Lib.lib(XTP9601Lib.dll) XCP9700BetaLibDynStatic.lib(XTPDrawHelpers.obj) : error LNK2005: "public: __thiscall CXTPPaintManagerColor::operator unsigned long(void)" (??BCXTPPaintManagerColor@@QAEKXZ) already defined in XTP9601Lib.lib(XTP9601Lib.dll) XCP9700BetaLibDynStatic.lib(XTPDrawHelpers.obj) : error LNK2005: "public: __thiscall CXTPEmptyRect::CXTPEmptyRect(void)" (??0CXTPEmptyRect@@QAE@XZ) already defined in XTP9601Lib.lib(XTP9601Lib.dll) XCP9700BetaLibDynStatic.lib(XTPDrawHelpers.obj) : error LNK2005: "public: __thiscall CXTPWindowRect::CXTPWindowRect(class CWnd const *)" (??0CXTPWindowRect@@QAE@PBVCWnd@@@Z) already defined in XTP9601Lib.lib(XTP9601Lib.dll) XCP9700BetaLibDynStatic.lib(XTPDrawHelpers.obj) : error LNK2005: "public: __thiscall CXTPFontDC::CXTPFontDC(class CDC *,class CFont *)" (??0CXTPFontDC@@QAE@PAVCDC@@PAVCFont@@@Z) already defined in XTP9601Lib.lib(XTP9601Lib.dll) XCP9700BetaLibDynStatic.lib(XTPDrawHelpers.obj) : error LNK2005: "public: virtual __thiscall CXTPFontDC::~CXTPFontDC(void)" (??1CXTPFontDC@@UAE@XZ) already defined in XTP9601Lib.lib(XTP9601Lib.dll) ../Build/Release/PromisProject.exe : fatal error LNK1169: one or more multiply defined symbols found The errors are obvious. But I need to get it to work anyways. How do I supress these errors
or is there any other way so I can use the component with the toolkit???
Thanks in advance.
Best regards,
Martin
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Try the following, these steps assume Visual Studio 2003, text in BOLD is what you should add:
Edited by SuperMario |
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Hi, first of all, thanks for your reply. But I am a bit confused here. I don't want to include the toolkit in the demo calendar application but I have an application which already has the xtreme toolkit included and up and running and now I want to include the calendar control in that application. This is what I've tried so far:
I included this line: #include <XTCalendarPro.h> after I included this line: #include <XTToolkitPro.h> I also tried some of the stuff from your post (but not all since not everything applies to my application being it not the sample application). Nothing seems to work, I am really at a loss here. Why is it not possible to simply use both kits simultaneously? And why is the calendar component not standard included in the beta toolkit? Then I wouldn't be having this problem in the first place. I really hope that someone can help me out here. Thanks in advance. |
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
One more addition to my previous post. The errors do not occur the moment I include the calendar component in my stdafx.h file, but when I define a variable in my class for the component as follows: CXTPCalendarControl m_wndCalendar; The moment I include this line the linker errors occur. Cheers, |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Try to link both statically. add #define _XTP_STATICLINK before #include <XTToolkitPro.h> |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Oleg, thanks for your reply but I already sent you an e-mail explaining that that didn't work as well. In case you didn't get it, here's the mail: Hi Oleg, Hi Coleen,
thanks for your efforts so far.
Oleg you're right, when I add this line: #define _XTP_STATICLINK
|
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
And another addition, I just tried to make a new MFC dialog based app, and included the calendar control in the stdafx.h file (nothing more nothing less). Now when I compile and run it there's no problem, but when I declare a variable for the calendar component it also crashes. Am I perhaps overlooking something? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
you need to add resource of calendar and toolkitpro.
add #include "XTToolkitPro.rc" and #include "XTCalendarPro.rc"
to your rc2 file. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
I got it to work!!!! Thanks a lot, now I only need to do some resizing and repositioning in my dialog but at least the calendar component shows up AND in combination with the Xtreme Toolkit! Thanks again for all your help guys! |
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
One small question though, why doesn't this work? It crashes my app at the following line: void CXTPCalendarControl::AdjustLayout(){ CRect rc; GetClientRect(&rc); if (!rc.IsRectEmpty()){ m_pActiveView->AdjustLayout(rc, TRUE); // CRASH HAPPENS HERE! } } My code: CRect rc; if (!m_wndCalendar.Create(WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BOR DER, rc, this, 333)) I need to declare the rectangle as CRect(0, 0, 0, 0) instead of my above approach. Can anybody shed some light on this issue? Thanks, |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Martin,
Try moving your resizing code to OnSize message handler, like in CCalendarDemoView::OnSize. Does this approach works? -- WBR, Serge |
|
Martin
Newbie Joined: 26 April 2005 Location: Netherlands Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Hi Serge, yes I already did that as a workaround but I think the above implementation is nicer. Besides I don't understand why the error occurs. It doesn't make sense to me. But for now it works... Cheers, |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |