Print Page | Close Window

Link Errors with ToolKitPro

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4759
Printed Date: 13 August 2025 at 4:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Link Errors with ToolKitPro
Posted By: skemp@docucorp
Subject: Link Errors with ToolKitPro
Date Posted: 08 August 2006 at 10:24am
New customer. We have a rather large application where we are trying to replace the existing framework with that from ToolKitPro. Unfortunately, early in the process we have hit a snag.
 
The application has multiple DLLs, ToolKitPro was built as a separate DLL using the provided wizard.  From our DLL, we have instantiated a XTP class. We can apparently call any member function as long as it does not require a CString as a parameter.  When we call a member requiring a CString, we get the following type of link error.
 
DCVCore error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall CXTPStatusBar::SetPaneText(int,class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > const &,int)" (__imp_?SetPaneText@CXTPStatusBar@@QAEHHABV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@H@Z) referenced in function "public: void __thiscall CMainFrame::SetIndicatorText(int,unsigned short const *)" ( mailto:?SetIndicatorText@CMainFrame@@QAEXHPBG@Z - ?SetIndicatorText@CMainFrame@@QAEXHPBG@Z )

This appears to be a name-mangling conflict.

In export file from Toolkit DLL

?SetPaneText@CXTPStatusBar@@QAEHHABV?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@H@Z

Link error from our DLL

?SetPaneText@CXTPStatusBar@@QAEHHABV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@H@Z)

You will notice that the CString parameter is not mangled the same way.
 
Our DLL is compiled for Unicode, just as we (think) selected for the ToolKit DLL.
 
Anyway, does anyone have a guess as to what will resolve our problem. I'm going to guess it is a compiler or linker option conflict between the DLLs. We'll be looking into that next.
 
SEK



Replies:
Posted By: skemp@docucorp
Date Posted: 08 August 2006 at 11:26am
Well, to answer our own question:
It appears to be the compile option that says a wchar is a built-in type. Once we turned that on and recompiled all relevant libraries, the link issue was resolved.
Now to see if we can get anything in the framework replaced and working....


Posted By: sserge
Date Posted: 08 August 2006 at 2:45pm
see also  %3ca%20href= - http://forum.codejock.com/forum_posts.asp?TID=2934 - http://forum.codejock.com/forum_posts.asp?TID=2934 and http://forum.codejock.com/forum_posts.asp?TID=3570 - http://forum.codejock.com/forum_posts.asp?TID=3570

--
WBR,
Serge


Posted By: skemp@docucorp
Date Posted: 08 August 2006 at 6:58pm
Thanks. We considered turning that option off in the ToolkitPro build to see what would happen. But then we figured we might have to change headers or source modules to include the define. And we're trying not to modify your library if possible.
 



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