delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/22/07:53:31

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: Wed, 22 Oct 2003 13:52:56 +0200
From: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
Reply-To: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <1011820442598.20031022135256@familiehaase.de>
To: marvin <cita140volunteer AT yahoo DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: little help with dll
In-Reply-To: <20031022112401.77225.qmail@web41701.mail.yahoo.com>
References: <20031022112401 DOT 77225 DOT qmail AT web41701 DOT mail DOT yahoo DOT com>
MIME-Version: 1.0

marvin wrote:

> hi-

> first... thanks Gerrit for the help.  i think i am
> making more progress.  i never built my own dll as an
> export library.  it is fun to try.

You'll need it only if you want to link executables or other modules
against the first module.

> i have a question about this code below.  the way i
> have it set up is fox.dll is the name of the dll i
> want to create.  fox.dll.a is (good question) i guess
> it is a output product of the process.  then i supply
> my object files.  then i supply the name of the import
> libs i need to link against.  

> here is a question.  do i have to supply all 19 of
> these import libs that end with *.a in my
> cygwin/lib/mingw directory?  i know there can be tons
> of these *.a and 19 is not very many but that is lots
> of typing.  is there a way i can not specify the path
> and then import lib name for every one of the 19.  for
> i.e. could i somehow skip the path and just list each
> one with some mystery setting or make it so it looks
> automatically at the directory and takes all the *.a
> files.  

Yes see below:

> -my settings for the last step required to build
> dll------------------------------------------------------

> c++ -shared -o fox.dll \
>     -Wl,--out-implib=fox.dll.a \
>     -Wl,--export-all-symbols \
>     -Wl,--enable-auto-import \
>     -Wl,--whole-archive /cygwin/fox.o /cygwin/fox_wrap.o  \
>     -Wl,--no-whole-archive 
> /cygwin/lib/mingw/libmingw32.a

> -----------------------------------------------

Shorter:
-Wl,--no-whole-archive -L/usr/lib/mingw -lmingw32


Gerrit
-- 
=^..^=                                     http://nyckelpiga.de/donate.html


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