delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/11/02:05:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Sun, 11 Jan 2004 08:04:54 +0100
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
Message-ID: <816188293.20040111080454@familiehaase.de>
To: Paul-Kenji Cahier <pkc AT F1-Photo DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: Ncurses prob
In-Reply-To: <1046266613.20040110051914@F1-Photo.com>
References: <20040109085401 DOT 53428 DOT qmail AT web11510 DOT mail DOT yahoo DOT com> <1991314664 DOT 20040109111718 AT F1-Photo DOT com> <1046266613 DOT 20040110051914 AT F1-Photo DOT com>
MIME-Version: 1.0
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/

- Raw text -


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