[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dev-serveez] Re: libtool 1.5 used in serveez package

From: stefan
Subject: Re: [dev-serveez] Re: libtool 1.5 used in serveez package
Date: Mon, 26 May 2003 06:49:02 +0200 (CEST)

On Sun, 25 May 2003, Bob Friesenhahn wrote:

> > This message indicates that libtool is not able/does not want to link the
> > static archive libiberty.a to the libserveez.dll.  This worked perfectly
> > with 1.4.2.  When looking at the magic_regex_expr ('file_magic ^x86
> > archive import|^x86 DLL') in libtool.m4 one can get the impression that
> > windows dlls are now allowed to be linked against other dlls only.  Static
> > archives are not allowed anymore.  Has this some reason?
> It was a bug to allow Windows DLLs to link against static libraries
> other than those delivered with the compiler.  1.5 fixes this bug.
> The reason why it is a bad idea to link DLLs with the static library
> is that the symbols from the static library are auto-imported similar
> to those intended to be exposed by the DLL. This can cause problems if
> two DLLs a program depends on link against the same static library,
> particularly if the static libraries are different versions.  Either
> there are duplicate symbols, or the result is ambigious.

Maybe I forgot to mention one thing.  The libserveez.dll does not require
the autoimport function of the mingw32 ld because it uses the DLL_EXPORT
define to explicitely import/export symbols like:

#if defined (__SERVEEZ_IMPORT__)
# define SERVEEZ_API __declspec (dllimport) extern
#elif defined (__SERVEEZ_EXPORT__) || defined (DLL_EXPORT)
# define SERVEEZ_API __declspec (dllexport) extern
# define SERVEEZ_API extern

Then each exported symbol gets defined like:

SERVEEZ_API int svz_check_sockets __PARAMS ((void));

Does that make a difference?  Would it be possible to link againt the
static archive 'libiberty.a' without causing the above problem from
libtool 1.4.2?

In fact it does not cause problems (as noted in my very first mail).

Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]