public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problems with generating kde2 dlls under cygwin
@ 2001-07-21  2:29 Ralf Habacker
  2001-07-21  2:49 ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Habacker @ 2001-07-21  2:29 UTC (permalink / raw)
  To: Binutils; +Cc: Cygwin

Hi all,
on compiling kde 2 for cygwin I have problems with the ld -whole-archive
option. Perhaps someone can help me.

The ld manual tells the following about the --whole-archive option:

"For each archive mentioned on the command line after the --whole-archive
option, include every object file in the archive in the link, rather than
searching the archive for the required object files. This is normally used
to turn an archive file into a shared library, forcing every object to be
included in the resulting shared library. This option may be used more than
once.""

This works good in the following manner:

g++ -shared <flags> -Wl,--whole-archive <objs> -Wl,-no-whole-archive
<deplibs>

and if <deplib> are import libs of other shared libraries.
If <deplib> contains a static lib, the used symbols of this lib are always
exported. Can anyone tell, whats goeing wrong and how I could supress this ?

Thank you for any help

Regard
Ralf Habacker


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with generating kde2 dlls under cygwin
  2001-07-21  2:29 Problems with generating kde2 dlls under cygwin Ralf Habacker
@ 2001-07-21  2:49 ` Alan Modra
  2001-07-21  4:38   ` AW: " Ralf Habacker
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2001-07-21  2:49 UTC (permalink / raw)
  To: Ralf Habacker; +Cc: Binutils, Cygwin

On Sat, Jul 21, 2001 at 11:32:36AM +0200, Ralf Habacker wrote:
> g++ -shared <flags> -Wl,--whole-archive <objs> -Wl,-no-whole-archive
> <deplibs>
> 
> and if <deplib> are import libs of other shared libraries.
> If <deplib> contains a static lib, the used symbols of this lib are always
> exported.

Why do you think they should not be exported?  A static lib is just an
archive of object files.  When object files are retrieved from a static
lib to satisfy undefined syms, they are treated the same as if you had
specified the individual object files on the command line.

Alan


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* AW: Problems with generating kde2 dlls under cygwin
  2001-07-21  2:49 ` Alan Modra
@ 2001-07-21  4:38   ` Ralf Habacker
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Habacker @ 2001-07-21  4:38 UTC (permalink / raw)
  To: Binutils, Cygwin; +Cc: Alan Modra

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]

> -----Ursprüngliche Nachricht-----
> Von: cygwin-owner@sources.redhat.com
> [ mailto:cygwin-owner@sources.redhat.com]Im Auftrag von Alan Modra
> Gesendet am: Samstag, 21. Juli 2001 11:49
> An: Ralf Habacker
> Cc: Binutils; Cygwin
> Betreff: Re: Problems with generating kde2 dlls under cygwin
>
> On Sat, Jul 21, 2001 at 11:32:36AM +0200, Ralf Habacker wrote:
> > g++ -shared <flags> -Wl,--whole-archive <objs> -Wl,-no-whole-archive
> > <deplibs>
> >
> > and if <deplib> are import libs of other shared libraries.
> > If <deplib> contains a static lib, the used symbols of this lib
> are always
> > exported.
>
> Why do you think they should not be exported?  A static lib is just an
> archive of object files.  When object files are retrieved from a static
> lib to satisfy undefined syms, they are treated the same as if you had
> specified the individual object files on the command line.
>
Thats right, but the problem is, if you add a static lib to resolve symbol
in
two dlls for example a.dll and b.dll and a.dll contains symbols needed by
b.dll,
linking of b.dll will fail because of duplicate symbols error.

> Alan
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-21  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-21  2:29 Problems with generating kde2 dlls under cygwin Ralf Habacker
2001-07-21  2:49 ` Alan Modra
2001-07-21  4:38   ` AW: " Ralf Habacker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).