Update: build.bat and example.c

This commit is contained in:
Rodolfo Barcelli Jo 2026-01-23 14:22:40 +08:00
parent a9372664de
commit f0b2ca9f81
2 changed files with 9 additions and 7 deletions

View file

@ -4,13 +4,15 @@ REM Build Script for Example 1
mkdir build mkdir build
if "%1"=="--setup" (
git submodule update --init git submodule update --init
pushd ".\external\raylib\" pushd ".\external\raylib\"
cmake -S . -B build -DBUILD_EXAMPLES=Off cmake -S . -B build -DBUILD_EXAMPLES=Off
cmake --build build cmake --build build
popd popd
)
pushd ".\build" 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 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 popd

View file

@ -129,7 +129,7 @@ int main(void) {
size_t componentSizes[4] = {sizeof(Position), sizeof(Velocity), sizeof(Acceleration), sizeof(ParticleData)}; size_t componentSizes[4] = {sizeof(Position), sizeof(Velocity), sizeof(Acceleration), sizeof(ParticleData)};
size_t memSize = BECS_GetMinMemoryArenaSize(componentSizes, 4); size_t memSize = BECS_GetMinMemoryArenaSize(componentSizes, 4);
#ifdef _WIN32 #ifdef _WIN32
printf("%lu\n", memSize); printf("%llu\n", memSize);
#elif __unix__ #elif __unix__
printf("%lu\n", memSize); printf("%lu\n", memSize);
#endif #endif