![]() |
Help Needed: Explicit Toolkit DLL linking problem |
Post Reply ![]() |
Author | |
cjsnewbie ![]() Groupie ![]() Joined: 24 October 2006 Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() Posted: 31 May 2007 at 9:50pm |
Hi,
I'm using version 10.3.1. I was using implicit linking until now. But I want to link explicitly now onwards. I have defined "_XTPLIB_NOAUTOLINK" in preprocessor settings of project. Now I'm getting error as shown below: ------------------------------- Error 23 error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum XTPPopupState __thiscall CXTPPopupControl::GetPopupState(void)const " (__imp_?GetPopupState@CXTPPopupControl@@QBE?AW4XTPPopupState@@XZ) referenced in function "long __cdecl PopUpNotify(unsigned int,long)" (?PopUpNotify@@YAJIJ@Z) -------------------------------- I looked at all exported symbols/functions/classes using dumpbin utility provided with Visual Studio. It shows this function is exported as: ----------------------------------- 6420 1913 003347DB ?GetPopupState@CXTPPopupControl@@QBE?AW4XTPPopupState@@XZ = @ILT+18390(?GetPopupState@CXTPPopupControl@@QBE?AW4XTPPopupState@@XZ) ----------------------------------- Only difference is __imp_ prepended in first: __imp_?GetPopupState@CXTPPopupControl@@QBE?AW4XTPPopupState@@XZ as comapared to exported one: ?GetPopupState@CXTPPopupControl@@QBE?AW4XTPPopupState@@XZ Looks like compiler is still looking for import library. How can I fix this problem? |
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
But do you add toolkit lib file to project lib dependence?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
cjsnewbie ![]() Groupie ![]() Joined: 24 October 2006 Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
Oleg,
Yes. I did. That fixed compilation error. But when I start my app, even before creating app object, it goes into toolkit dll. Since I'm explicitly linking ,shouldn't it wait until I called LoadLibrary function. Look at call stack. Looks like it's going in DllMain() of toolkit dll. I guess, it is still not linking explicitly. If you guys have any sample code, I would really appreciate that. One more thing: My understanding was that lib file is not required when you link dll explicitly. See this: http://msdn2.microsoft.com/en-us/library/ms686944.aspx
|
|
![]() |
|
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1201 |
![]() ![]() ![]() ![]() ![]() |
Hi,
as far as I know is dynamic load of MFC extension DLLs a nightmare/impossible.
The codejock DLL exposes (MFC) C++ classes, not plain stdcall C API functions. The latter are candidates for dynamic load by calling LoadLibrary/GetProcAddress.
Explore the DLL using depends e.g. As you will see, classes and methods are somehow cryptic and definition of function pointer types for C++ class functions is almost impossible - not mentioning virtual functions...
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
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 |