Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Link Errors with ToolKitPro
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Link Errors with ToolKitPro

 Post Reply Post Reply
Author
Message
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post Topic: Link Errors with ToolKitPro
    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)

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
Back to Top
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2006 at 2:45pm
Back to Top
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post 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.
 
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.031 seconds.