Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 11 Jan 2004 08:04:54 +0100
From: "Gerrit P. Haase" <gp@familiehaase.de>
Reply-To: "Gerrit @ cygwin" <cygwin@cygwin.com>
Organization: Esse keine toten Tiere
Message-ID: <816188293.20040111080454@familiehaase.de>
To: Paul-Kenji Cahier <pkc@F1-Photo.com>
CC: cygwin@cygwin.com
Subject: Re: Ncurses prob
In-Reply-To: <1046266613.20040110051914@F1-Photo.com>
References: <20040109085401.53428.qmail@web11510.mail.yahoo.com> <1991314664.20040109111718@F1-Photo.com> <1046266613.20040110051914@F1-Photo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hallo Paul-Kenji,

Am Samstag, 10. Januar 2004 um 05:19 schriebst du:

[...]

> Most libs were compiled this way:

> gcc -g -Wall -ansi -pedantic -Wwrite-strings -Wshadow
> -Waggregate-return -I. -I/home/calendar/include -I. -I/usr/include
> -I/usr/include/ncurses -I/usr/local/include -c output.c         -o
> ../liboxhtml.so
> gcc -g -shared -o ../liboxhtml.so.dll -Wl,--export-all-symbols
> -Wl,--enable-auto-import -Wl,--whole-archive ../liboxhtml.so
> -Wl,--no-whole-archive -L/home/calendar/lib -L/usr/lib -lintl
> -lncurses
> cp liboxhtml.h /home/calendar/include
> cp ../liboxhtml.so.dll ../liboxhtml.so (i added this line later to
> check it wasnt a prob with filenames but it wasnt)


Ok, so why don't you use the suffixes as I quoted them in my last mail
(import-libs: *.dll.a, shared libs: *.dll)

gcc -shared -o cygName.dll -Wl,--out-implib=libName.dll.a \
    -Wl,--export-all-symbols -Wl,--enable-auto-import \
    -Wl,--whole-archive libName.a  \
    -Wl,--no-whole-archive -L/libpath [...other libs...]

where you may also use a list of object files instead of archived
object files after -Wl,--whole-archive.

The linker looks for:
1. libName.dll.a
2. libName.a
3. cygName.dll
(in this order) when you write -lName on the link line.


HTH,
Gerrit
-- 
=^..^=



--
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/

