Created
December 14, 2021 12:45
-
-
Save rondreas/fe621fa698244dda67137b4f8386c2ad to your computer and use it in GitHub Desktop.
Thank you handmade hero for making it easier to compile stuff
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 | |
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