@echo off

Rem
Rem   A crude way to construct DEF file for DLL construction out of OBJ files
Rem for Window NT 4.0. Expects one argument - the library directory
Rem
Rem   The following construction is highly VC++ version dependend (tested
Rem on VC 4.1) and assumes the availability of grep, sed and gawk.
Rem   If you have a better idea how to construct the def file, let me know!!!
Rem   In fact, I cannot believe there is no way in VC++ to construct a DLL
Rem that simply exports ALL external symbols...
Rem

dumpbin /symbols %1/*.obj | grep -v UNDEF | grep External | gawk -- {print$NF} | sed -e "s/_//" >> %2
