Skip to content

Instantly share code, notes, and snippets.

@Joshua-Ashton
Created July 14, 2020 01:23
Show Gist options
  • Save Joshua-Ashton/48f7f7a234c89ba55cc8e62429378d73 to your computer and use it in GitHub Desktop.
Save Joshua-Ashton/48f7f7a234c89ba55cc8e62429378d73 to your computer and use it in GitHub Desktop.
@echo off
REM Generate a .lib from a .dll
REM By Joshua Ashton
REM
REM Usage: make_lib.bat libfontconfig-1.dll fontconfig x64
set dllname=%1
set outname=%2
set arch=%3
shift
shift
shift
echo Generating %outname%.lib from %dllname%.dll for %arch%
gendef %dllname%.dll
ren %dllname%.def %outname%.def
lib /def:%outname%.def /out:%outname%.lib /machine:%arch%
del %outname%.def
del %outname%.exp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment