Created
December 19, 2019 21:00
-
-
Save gdianaty/09e520ee3106fc28fbff2cde08bfe49a to your computer and use it in GitHub Desktop.
Generate .lib files from every DLL in the same directory as this batch file.
This file contains 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
@echo off | |
:: Authored by a very lazy Graham Dianaty, 2019 | |
:: Move recursively thru all files in same directory and generate lib files for them using black magic. | |
:: Note: %%~nf removes the extension from a file. | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" | |
cls | |
for /R %%f in (*.dll) do ( | |
echo [symbolgen.bat] Dumping %%f... | |
dumpbin /exports "%%~nf.dll" > "%%~nf.def" | |
echo [symbolgen.bat] Compiling %%~nf symbols for win32 | |
lib /def:"%%~nf.def" /out:"%%~nf.lib" /machine:x86 >> "%%~nf.compilelog.txt" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment