Skip to content

Instantly share code, notes, and snippets.

@rondreas
Created Dec 14, 2021
Embed
What would you like to do?
Thank you handmade hero for making it easier to compile stuff
@echo off
REM adds cl.exe to path
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64
REM Set current dir to folder of this script
pushd %~dp0
REM Then create and cd into build folder
mkdir build
pushd build
REM /I - additional include directories
REM /c - compile without linking
REM /EHsc - Exception handling model. sc - compiler will assume functions declared as extern C never throw C++ exceptions
cl.exe /I ..\include /c /EHsc ..\common\*.cpp
lib.exe /OUT:lxsdk.lib *.obj
REM cd .. to the original folder
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment