I am sorry if a post with similar subject has been made earlier. I would appreciate if you could please send pointers to that post.
I am currently porting a 3rd party provided win32 library (say ThirdPartyLib.lib) onto Series60 WINSCW UDEB target. I think that this is a static library because there is no DLL provided along with this lib
file.
My Engine component has TARGETTYPE DLL and it tries to import this 3rd party
lib as STATICLIBRARY. The MMP structure is as below:
------------------------------------------------
TARGET MyEngine.dll
TARGETTYPE dll
UID 0x1000008d 0x12345678
...
//LIBRARY ThirdPartyLib.lib
// No change in behaviour if LIBRARY above
// is uncommented and STATICLIBRARY below is commented
STATICLIBRARY ThirdPartyLib.lib
LIBRARY EUser.lib EFSRV.lib EStLib.lib
------------------------------------------------
When I build (abld build winscw udeb) I get linker errors on methods called into ThirdPartyLib.lib thats says as below
------------------------------------------------
mwldsym2.exe: Undefined symbol: '__declspec(dllimport)
_somemethod(__imp__somemethod)'
mwldsym2.exe: Note: symbol '_somemethod' found in ThirdPartyLib.lib';
"mwldsym2.exe: your project may need the DLL import library instead of
a static library"
------------------------------------------------
If I change the TARGETTYPE to LIB then the WINSCW platform build goes fine but I want the TARGETTYPE to be DLL..
Also, this same MMP setup (i.e., with TARGETTYPE DLL entry) works fine with WINS platform builds.
Can you kindly point out how this can be solved for WINSCW.
Thanks for the reply.
The problem is we do not have access to the source code of the 3rd party Libraries. And also, they are provided as LIBs (.lib) only.
But the same setup works with WINS builds. That is I am able to statically link the 3rd party .lib and build my library as a .dll.
So is it so that this is an issue with CodeWarrior itself?