[Top][All Lists]

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

Produce cygwin shared library (cyg<name>.dll) that depends from other sh

From: Denis Chancogne
Subject: Produce cygwin shared library (cyg<name>.dll) that depends from other shared libraries.
Date: Wed, 12 Dec 2007 11:54:14 +0100


I try to produce a shared library under Cygwin but I have some problem about
prefix of other shared libraries.

It seems that aclocal and autoconf produce, under Cygwin, shared library
prefix cyg instead of lib. (aclocal.m4 code :

      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release}
| $S
ED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'


But when you try to link with external shared libraries (example :
-lcygicuin38 or -licuin38),
libtool search only libraries of the form : lib<name>.dll (aclocal.m4 code :


) (so it doesn't found cygicuin38.dll
library) and so produce static library instead of shared. Nevertheless, ld
(gnu linker) found
all kind of libraries (-lcygicuin38 or -licuin38 works with
cygicuin38.dllfile, so you need to
give this option to libtool : -Wl,-licuin38, I don't think this is a good

So what's the common way to link under Cygwin with a shared library that
file name can be either
lib<name>.dll or cyg<name>.dll (example : libhttpd.dll, cygicuin38.dll) and
is there an option to
produce a shared library with lib prefix ?

I hope my question is clear,
thanks in advance for your response.

reply via email to

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