Created
October 5, 2022 16:47
-
-
Save melanchall/b6e90b94141fafcc15c9a6d1b21a4715 to your computer and use it in GitHub Desktop.
[Medium] NuGet Native 15
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
Write-Host "Downloading winlibs..." | |
Invoke-WebRequest -Uri "https://github.com/brechtsanders/winlibs_mingw/releases/download/11.1.0-12.0.0-9.0.0-r1/winlibs-i686-posix-dwarf-gcc-11.1.0-mingw-w64-9.0.0-r1.zip" -OutFile "winlibs.zip" | |
Write-Host "Downloaded." | |
Write-Host "Extracting winlibs..." | |
Expand-Archive -LiteralPath 'winlibs.zip' -DestinationPath "winlibs" | |
Write-Host "Extracted." | |
Write-Host "Building DLL..." | |
$gccPath = Get-ChildItem -Path "winlibs" -File -Filter "i686-w64-mingw32-gcc.exe" -Recurse | |
& $gccPath.FullName -c test.c -m32 | |
& $gccPath.FullName -shared -o test.dll test.o -m32 | |
Write-Host "Built." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment