Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - dll error at run time?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

dll error at run time?

 Post Reply Post Reply
Author
Message
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Topic: dll error at run time?
    Posted: 19 July 2007 at 10:16am

Hi,

   I have created a class like this(please see the below code)

class _XTP_EXT_CLASS CXTPMyFrameWnd : public CXTPFrameWndBase<CFrameWnd>

{

public:

DECLARE_DYNAMIC(CXTPMyFrameWnd)

//-----------------------------------------------------------------------

// Summary:

// Constructs a CXTPOleIPFrameWnd object

//-----------------------------------------------------------------------

CXTPMyFrameWnd();

};

in xtpframewnd.h and the implementation in the xtpframewnd.cpp. I have compiled the code and it created the ToolkitPro1110vc80D.dll and ToolkitPro1110vc80D.lib.
when I am using those .dll and .lib in another MFC application with changing the class CFrameWnd to CXTPMyFrameWnd in mainfrm.h, it complies very good but at runtime it shows a messsage called
"The procedure entry point ??1CXTPMyFrameWnd@@UAE@XZ could not be located in the dynamic link library ToolkitPro1110vc80D.dll". Please suggest, what went wrong an give me a solution for that.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 2:41am
Hi,
remove _XTP_EXT_CLASS  - its only for internal classes.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 3:06am
Hi,
  I have removed the _XTP_EXT_CLASS. But I am getting the linker error like this.

error LNK2019: unresolved external symbol "public: static struct CRuntimeClass * __stdcall CXTPMyFrameWnd::GetThisClass(void)" (?GetThisClass@CXTPMyFrameWnd@@SGPAUCRuntimeClass@@XZ) referenced in function "protected: static struct CRuntimeClass * __stdcall CMainFrame::_GetBaseClass(void)" (?_GetBaseClass@CMainFrame@@KGPAUCRuntimeClass@@XZ)

error LNK2019: unresolved external symbol "public: __thiscall CXTPMyFrameWnd::CXTPMyFrameWnd(void)" (??0CXTPMyFrameWnd@@QAE@XZ) referenced in function "public: __thiscall CMainFrame::CMainFrame(void)" (??0CMainFrame@@QAE@XZ)

Please help.

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 4:30am

Did you implement constructor for CXTPMyFrameWnd and add IMPLEMENT_DYNAMIC macros ?

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 5:24am
Hi,
   Yes, I did it previously.What next?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 6:23am
Hi,
 
See error message. 
 
Compiler can't find it - may be you added it in cpp, but didn't add this cpp to project.
 
Show code with IMPLEMENT_DYNAMIC  macro.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 6:46am
xtpframewnd.cpp contains..
 
IMPLEMENT_DYNAMIC(CXTPMyFrameWnd, CFrameWnd)

CXTPMyFrameWnd::CXTPMyFrameWnd()

{

}

I have added those xtpframewnd.h and .cpp in projects already.
The ToolkitPro1110vc80D.dll and .lib files are created and it's in the debug directory.
 
error:

2>MainFrm.obj : error LNK2019: unresolved external symbol "public: __thiscall CXTPMyFrameWnd::CXTPMyFrameWnd(void)" (??0CXTPMyFrameWnd@@QAE@XZ) referenced in function "public: __thiscall CMainFrame::CMainFrame(void)" (??0CMainFrame@@QAE@XZ)

Please help.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 7:08am
Hi
 
Try rebuild whole application.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 8:59am
Hi,
   I did,same result.
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 9:18am
Hi,
  I am uploading some relevant files.uploads/20070720_091823_Test.rar
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2007 at 3:10pm
Oh, You didnt' wrrite that you modify our source - XTPFrameWnd - why ?
Just move CXTPMyFrameWnd to your application code to MainFrame.h or create own file. Compiler can't find it because you modify file that part of toolkit library.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2007 at 6:58am
Hi Oleg,
  Many Thanks. I have another query. Please see the below statement.
 

CFrameWnd* pWndFrame;

GetCommandBars()->SetSite(pWndFrame);

GetCommandBars()->EnableDocking();  ---> Getting Assertion over here.

// Add the menu bar

CXTPCommandBar* pMenuBar = GetCommandBars()->SetMenu(_T("Menu Bar"), IDR_EMBEDDEDPAGE_SRVR_IP);

if(pMenuBar == NULL)

{

TRACE0("Failed to create menu bar.\n");

return -1; // fail to create

}

When I am using the Enabledocking, I am getting assertion in the EnableDocking function code here. ASSERT(!m_pDocks);
 
But, I have to use the EnableDocking statement in my code, otherwise it is not properly docking the menubar. Please help.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2007 at 8:22am

Hello,

Think you didn't create commandbars and GetCommandBars() returned NULL.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ashok View Drop Down
Senior Member
Senior Member


Joined: 02 May 2007
Status: Offline
Points: 164
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashok Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2007 at 8:38am
Hi,
  I have already did like this.

// Initialize the command bars

if (!InitCommandBars())

return -1;

// Get a pointer to the command bars object.

CXTPCommandBars* pCommandBars = GetCommandBars();

if(pCommandBars == NULL)

{

TRACE0("Failed to create command bars object.\n");

return -1; // fail to create

}

I am getting the commandbar,the problem is EnableDocking gives some assertion.Why I need is I have to place the commandbar over the container?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2007 at 2:17am
Hi,
 
I don't like what you do - you host commandbars in one frame but want commandbars appear in another -
GetCommandBars()->SetSite(pWndFrame);
 
EnableDocking is called automatically  in InitCommandBars.
 
this pWndFrame have to contain commandbars.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.187 seconds.