delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/27/04:53:38

From: gunther DOT ebert AT ixos-leipzig DOT de (Gunther Ebert)
Subject: Re: DLL: How to generate .def from UNIX src
27 Jan 1997 04:53:38 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <32EC94FE.711F.cygnus.gnu-win32@ixos-leipzig.de>
References: <199701241057 DOT LAA93020 AT sp059 DOT cern DOT ch>
Mime-Version: 1.0
X-Mailer: Mozilla 3.0Gold (WinNT; I)
Original-To: Valery Fine <Valeri DOT Faine AT cern DOT ch>
Original-Cc: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Hi,

try

gcc -c <source files>
ar rc <tmplib> <compiled source files (.o)>
ranlib <tmplib>
echo EXPORTS > <.def file>
nm <tmplib> | grep " [CT] " | sed '/ _/s// /' | awk '{print $3;}' >>
<.def file>

This works fine for me.

Gunther

Valery Fine wrote:
> 
>   Hello world.
> 
>   Does any body there can point me how one can generate a def files
> from the source (C/C++) to make DLL's?
>   It is assumed the source is "pure" one. No DLLImport/Export things
> but plenty of entry points and global/static variables to access.
> 
>    Any idea will be appreciated a lot.
>                                             Valery
> =================================================================
> Dr. Valery Fine                  Telex : 911621 dubna su
>     -----------
> LCTA/Joint Inst.for NuclearRes   Phone : +7 09621 6 40 80
> 141980 Dubna, Moscow region      Fax   : +7 09621 6 51 45
> Russia                           mailto:fine AT main1 DOT jinr DOT dubna DOT su
>                                  mailto:fine AT vxcern DOT cern DOT ch
> Dr. Valeri Faine
>     ------------                 Phone: +41 22 767 6468
> CERN                             FAX  : +41 22 782 2601
> CH-1211 Geneva, 23               mailto:fine AT vxcern DOT cern DOT ch
> Switzerland                      http://nicewww.cern.ch/~fine
> 
> -
> For help on using this list, send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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