Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com X-Received: (from news AT localhost) by esem.com (8.7.5/8.7.3) id RAA26027 for nittka; Wed, 27 Oct 1999 17:17:46 +0200 Path: kalserv.esem.com!news From: Oliver Nittka Subject: any gotchas with import-lib ? Date: 27 Oct 1999 17:17:44 +0200 Organization: ESEM Gruenau GmbH Lines: 58 Message-ID: NNTP-Posting-Host: oly.esem.com X-Newsreader: Gnus v5.7/Emacs 20.4 To: cygwin AT sourceware DOT cygnus DOT com ReSent-Date: Wed, 27 Oct 1999 17:19:21 +0200 (MET DST) ReSent-From: Oliver Nittka ReSent-To: cygwin AT sourceware DOT cygnus DOT com ReSent-Message-ID: hi ! i'm currently using the following script to create a lib that i can use to link my programs against some arbitrary dlls: -------------------- implib.sh ------------------ #!/bin/sh if [ "$1" == "" ]; then echo "usage: $0 dllfile" exit 1 fi bname=$(basename $1) bname=${bname%.dll} bname=${bname%.DLL} defname=${bname}.def libname=lib${bname}.a # create def file echo "EXPORTS" > $defname objdump -p $1 | \ sed "1,/^The Export Tables/d" | \ sed "1,/^\[Ordinal\/Name Pointer\]/d" | \ sed "/^$/,$ d;s/^.*\[.*\] //1" >> $defname # create import lib dlltool -k --def $defname --output-lib $libname --dllname ${bname}.dll ------------------------------------------------- it seems to work fine, but i'd like to know, if there are any hidden gotchas using that method. background: i am frequently building extensions for tcl, which i want to link against the DLLs that come from scriptics, just so everyone can use them without having cygwish etc. earlier, i used to (try to) compile the whole tcl/tk - tarballs, usually with the help of mumit khan's patches (hey, thanks again mumit !), just for the sake of those libtcl80.a etc. a few days ago, i found out the above, and since then i don't have to go through all that hassle. as i said, it all seems to work fine, i can build my extensions and all, but i just wanted to make sure :-) comments very wellcome. TIA ! -- oly -- Oliver Nittka | nittka AT esem DOT com ESEM Gruenau GmbH & Co. KG | http://www.esem.com Riedheimer Str.6 | phone: +49 7544 9583-25 88677 Markdorf / Germany | fax: +49 7544 9583-60 -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com