![]() |
Link Errors with ToolKitPro |
Post Reply ![]() |
Author | |
skemp@docucorp ![]() Newbie ![]() Joined: 08 August 2006 Location: United States Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() 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 *)" (?SetIndicatorText@CMainFrame@@QAEXHPBG@Z)
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 |
|
![]() |
|
skemp@docucorp ![]() Newbie ![]() Joined: 08 August 2006 Location: United States Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() |
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....
|
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
see also http://forum.codejock.com/forum_posts.asp?TID=2934 and http://forum.codejock.com/forum_posts.asp?TID=3570
-- WBR, Serge |
|
![]() |
|
skemp@docucorp ![]() Newbie ![]() Joined: 08 August 2006 Location: United States Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
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 |