From f0b2ca9f81b88b6e89324b7581925cea3beacbc9 Mon Sep 17 00:00:00 2001 From: Rodolfo Barcelli Jo Date: Fri, 23 Jan 2026 14:22:40 +0800 Subject: [PATCH] Update: build.bat and example.c --- examples/example1/build.bat | 14 ++++++++------ examples/example1/example1.c | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/example1/build.bat b/examples/example1/build.bat index 2fcac26..b7bef79 100644 --- a/examples/example1/build.bat +++ b/examples/example1/build.bat @@ -4,13 +4,15 @@ REM Build Script for Example 1 mkdir build -git submodule update --init - -pushd ".\external\raylib\" -cmake -S . -B build -DBUILD_EXAMPLES=Off -cmake --build build -popd +if "%1"=="--setup" ( + git submodule update --init + pushd ".\external\raylib\" + cmake -S . -B build -DBUILD_EXAMPLES=Off + cmake --build build + popd +) pushd ".\build" cl /Zi raylib.lib user32.lib opengl32.lib gdi32.lib winmm.lib msvcrt.lib shell32.lib "..\example1.c" -Ic:"\external\raylib\build\raylib\include" /link /libpath:c:"..\external\raylib\build\raylib\Release" /NODEFAULTLIB:libcmt /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcmtd +if "%1"=="--run" if %errorlevel%==0 example1.exe popd diff --git a/examples/example1/example1.c b/examples/example1/example1.c index dcba100..5f0c561 100644 --- a/examples/example1/example1.c +++ b/examples/example1/example1.c @@ -129,7 +129,7 @@ int main(void) { size_t componentSizes[4] = {sizeof(Position), sizeof(Velocity), sizeof(Acceleration), sizeof(ParticleData)}; size_t memSize = BECS_GetMinMemoryArenaSize(componentSizes, 4); #ifdef _WIN32 - printf("%lu\n", memSize); + printf("%llu\n", memSize); #elif __unix__ printf("%lu\n", memSize); #endif