WINSCW linker issue: How to include a 3rd party static lib

Login to reply to this topic.
Wed, 2005-03-16 02:14
Joined: 2004-01-14
Forum posts: 3
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

Fri, 2006-03-03 10:37
Joined: 2006-03-03
Forum posts: 1
Re: WINSCW linker issue: How to include a 3rd party static lib
Hi enhariharan,

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
Wed, 2006-03-22 17:45
Joined: 2006-03-22
Forum posts: 3
Re: WINSCW linker issue: How to include a 3rd party static lib
Hi Guys,
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.


Fri, 2006-06-02 23:27
Joined: 2006-05-08
Forum posts: 162
Re: WINSCW linker issue: How to include a 3rd party static lib
Yet another I don't have GGE in my path or the installation is screwed thing!


http://www.tanzim.co.uk/blog/2006/05/24/carbidec-first-look/
and
http://forum.newlc.com/index.php/topic,13843.0.html


Quote from: Mirec
Hi Guys,
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.




Tue, 2006-06-20 15:08
Joined: 2006-05-30
Forum posts: 19
Re: WINSCW linker issue: How to include a 3rd party static lib
Check the latest S60 release notes

- 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.

  • Login to reply to this topic.