Print Page | Close Window

dll error at run time?

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=7627
Printed Date: 07 July 2025 at 9:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: dll error at run time?
Posted By: Ashok
Subject: dll error at run time?
Date 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 mailto:??1CXTPMyFrameWnd@@UAE@XZ - ??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.



Replies:
Posted By: Oleg
Date Posted: 20 July 2007 at 2:41am
Hi,
remove _XTP_EXT_CLASS  - its only for internal classes.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date 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)" ( mailto:?GetThisClass@CXTPMyFrameWnd@@SGPAUCRuntimeClass@@XZ - ?GetThisClass@CXTPMyFrameWnd@@SGPAUCRuntimeClass@@XZ ) referenced in function "protected: static struct CRuntimeClass * __stdcall CMainFrame::_GetBaseClass(void)" ( mailto:?_GetBaseClass@CMainFrame@@KGPAUCRuntimeClass@@XZ - ?_GetBaseClass@CMainFrame@@KGPAUCRuntimeClass@@XZ )

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

Please help.

 



Posted By: Oleg
Date Posted: 20 July 2007 at 4:30am

Did you implement constructor for CXTPMyFrameWnd and add IMPLEMENT_DYNAMIC macros ?



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 20 July 2007 at 5:24am
Hi,
   Yes, I did it previously.What next?


Posted By: Oleg
Date 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


Posted By: Ashok
Date 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)" ( mailto:??0CXTPMyFrameWnd@@QAE@XZ - ??0CXTPMyFrameWnd@@QAE@XZ ) referenced in function "public: __thiscall CMainFrame::CMainFrame(void)" (??0CMainFrame@@QAE@XZ)

Please help.


Posted By: Oleg
Date Posted: 20 July 2007 at 7:08am
Hi
 
Try rebuild whole application.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date Posted: 20 July 2007 at 8:59am
Hi,
   I did,same result.


Posted By: Ashok
Date Posted: 20 July 2007 at 9:18am
Hi,
  I am uploading some relevant files. https://forum.codejock.com/uploads/20070720_091823_Test.rar - uploads/20070720_091823_Test.rar


Posted By: Oleg
Date 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


Posted By: Ashok
Date 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.


Posted By: Oleg
Date Posted: 23 July 2007 at 8:22am

Hello,

Think you didn't create commandbars and GetCommandBars() returned NULL.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ashok
Date 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?


Posted By: Oleg
Date 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



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