WINSCW linker issue: How to include a 3rd party static lib
| Wed, 2005-03-16 02:14 | |
|
Hi,
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 // <---- There is no change in error behaviour if LIBRARY is uncommented and STATICLIBRARY 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, Hari |
|






Forum posts: 1
Did you ever find any solution for this issue? I'm dealing with it right now when porting from S60 2nd to S60 3rd. And I have the same behaviour. Furthermore, I can actually build with GCCE (abld build gcce urel) but not with WINSCW when targettype is 'dll' instead of 'lib'.
Thanks ni advance,
Oscar
Forum posts: 3
I try to create a static lib (targettype lib) and i have problem.
I can build it for winscw (abld build winscw udeb) and it works. (i use it in some other projects)
But... but when i try to build it for gcce urel - i can't.
It creates all *.o files but after that i get:
"process_begin: CreateProcess((null), cr ....list of all *.o files ..... ) failed.
make (e=2): The system cannot find the file specified."
All of the *.o files are created!
I have no idea what to do....
Please, help.
Forum posts: 162
http://www.tanzim.co.uk/blog/2006/05/24/carbidec-first-look/
and
http://forum.newlc.com/index.php/topic,13843.0.html
I try to create a static lib (targettype lib) and i have problem.
I can build it for winscw (abld build winscw udeb) and it works. (i use it in some other projects)
But... but when i try to build it for gcce urel - i can't.
It creates all *.o files but after that i get:
"process_begin: CreateProcess((null), cr ....list of all *.o files ..... ) failed.
make (e=2): The system cannot find the file specified."
All of the *.o files are created!
I have no idea what to do....
Please, help.
http://www.tanzim.co.uk
Forum posts: 19
- In the SDK default configuration GCCE linker will not handle circular dependencies between static libraries when linking them into a single dll. To correct this problem change the following lines in file
 <SDK>\epoc32\tools\cl_bpabi.pm :
 PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList);
 To section:
 my $Plat =  uc(&main::Plat);
 &main::Output(" \\\n\t-\(") if (@StatLibList && ($Plat eq  "GCCE"));
 PrintList("\'  \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)",  @StatLibList);
 &main::Output(" \\\n\t-\)") if (@StatLibList && ($Plat eq  "GCCE"));
 As a last minute fix this was not included in SDK and is not properly system tested.
Kishore.