Skip to content

Instantly share code, notes, and snippets.

@MVoz
Forked from retorillo/Windows C Compiler.ps1
Created April 1, 2018 17:53
Show Gist options
  • Save MVoz/43dcafbbe917bc982e4188c062aee68f to your computer and use it in GitHub Desktop.
Save MVoz/43dcafbbe917bc982e4188c062aee68f to your computer and use it in GitHub Desktop.
Minimal PowerShell Script for Windows C Compiler (Requires Windows 10 SDK & Visual Studio 2015 Community)
$sdkver = "10.0.14393.0"
$sdkdir = "${env:ProgramFiles(x86)}\Windows Kits\10"
$sdkincdir = "$sdkdir\Include\$sdkver"
$sdklibdir = "$sdkdir\Lib\$sdkver"
$vcdir = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 14.0\VC"
$env:path += ";$vcdir\bin\amd64;$sdkdir\bin\amd64"
$env:include += ";$vcdir\include" `
+ ";$sdkincdir\shared;$sdkincdir\ucrt;$sdkincdir\um;$sdkincdir\winrt"
$env:lib += ";$vcdir\lib\amd64;$sdklibdir\ucrt\x64;$sdklibdir\um\x64"
$env:libpath += "$vcdir\lib\amd64"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment