Mail Archives: cygwin/1999/10/27/11:22:20
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
- Raw text -