Problem compiling libcfg+

Brian Dessent
Thu Jan 25 17:26:00 GMT 2007

Luis Rodrigo Aguado wrote:

> ld  -shared -o ../src/cfg+.o ../src/parse.o
> ../src/props.o ../src/cmdline.o ../src/cfgfile.o ../src/shared.o
> ../src/platon/str/strplus.o ../src
> /platon/str/strctype.o ../src/platon/str/strdyn.o
> ../src/platon/str/dynfgets.o

This is the problem.  The package's makefile is calling ld directly to
link.  It's also assuming that shared libraries have the .so extension. 
Neither of these are true on Cygwin, which means whoever maintains this
package was not very worried about portability, because this is a pretty
awful way to write a makefile.

If you want it to work, you'll need to change the makefile to link with
gcc, to use the correct output filename (probably cygcfg+.dll but
possibly cygcfg+-n.dll where 'n' is the ABI version), create an import
libary (-Wl,--out-implib,libcfg+.dll.a), enable auto image basing
(-Wl,--enable-auto-image-base), etc.  These sorts of differences in
creating libraries are exactly why libtool was invented, rather than
hand-coding the link step in the makefile.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list