@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 two arguments - the library directory and the Rem name of output (DEF) file. 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 echo Processing external variables of library %1 into %2 Rem dumpbin /symbols %1/*.Dobj | grep -v UNDEF | grep -w External | gawk -- {print $NF} | sed -e "s/^_/ /" >> %2 dumpbin /symbols %1/*.Dobj | grep -v UNDEF | grep -w External | gawk '{print $NF}' | sed -e "s/^_//" | grep -v _real@ >> %2