Skip to content

Instantly share code, notes, and snippets.

@doccaico
Created December 3, 2025 14:41
Show Gist options
  • Select an option

  • Save doccaico/e83278a8896bb848e6111e15b9625cdf to your computer and use it in GitHub Desktop.

Select an option

Save doccaico/e83278a8896bb848e6111e15b9625cdf to your computer and use it in GitHub Desktop.
build and run on Windows (Odin + Raylib)
@echo off
setlocal
set EXE=main
set PDB=main
odin build main.odin -file -strict-style -vet -debug -out:%EXE%.exe -pdb-name:%PDB%.pdb
if %ERRORLEVEL% neq 0 exit /b 1
set ODIN_PATH=
for /f "delims=" %%i in ('odin root') do set "ODIN_PATH=%%i"
if not exist "raylib.dll" (
if exist "%ODIN_PATH%\vendor\raylib\windows\raylib.dll" (
copy "%ODIN_PATH%\vendor\raylib\windows\raylib.dll" . 1> nul
if %ERRORLEVEL% neq 0 exit /b 1
) else (
echo "Please copy raylib.dll from <your_odin_compiler>/vendor/raylib/windows/raylib.dll to the same directory as %EXE%.exe"
exit /b 1
)
)
if "%~1"=="run" (
%EXE%.exe
)
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment