dll error at run time? |
Post Reply |
Author | |
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
remove _XTP_EXT_CLASS - its only for internal classes.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Did you implement constructor for CXTPMyFrameWnd and add IMPLEMENT_DYNAMIC macros ? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi,
Yes, I did it previously.What next?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi
Try rebuild whole application.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi,
I did,same result. |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
Hi,
I am uploading some relevant files.uploads/20070720_091823_Test.rar
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, Think you didn't create commandbars and GetCommandBars() returned NULL.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ashok
Senior Member Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
|
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
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 |