Created
September 28, 2016 09:12
-
-
Save ksophocleous/38bc2e77c313cf2e9a10cc33b9b85d6c to your computer and use it in GitHub Desktop.
create DEF file from exports (dumpbin /nologo /exports)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
dumpbin /nologo /exports ${LIBNAME}.dll > exports.txt | |
echo "EXPORTS" > exports.def | |
tail -n +17 exports.txt | awk '{ $1=""; $2=""; $3=""; print $0 }' | sed -r 's/\s*(.*?)\s*$/\1/' | sed '/^$/d' >> exports.def | |
lib /def:exports.def ${LIBNAME}.lib | |
rm -f exports.txt exports.def |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment