delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/25/12:26:59

X-Spam-Check-By: sourceware.org
Message-ID: <45B8E7D4.B0F1B3FF@dessent.net>
Date: Thu, 25 Jan 2007 09:24:36 -0800
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problem compiling libcfg+
References: <45B87011 DOT 1030604 AT isoco DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Luis Rodrigo Aguado wrote:

> ld  -shared -o libcfg+.so.0.6.2 ../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.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019