Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / commits / 1650c9c

sdl_runtime_compiler git · main

SDL3 game for running and compiling code at runtime

sdl3 c++ compiler dlopen cmake · first commit 2026-04-19 · last commit 2026-07-03 (3 months ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-runtime-compiler

C++ 72.3% C 26.2%
git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gz

Use c++ and cc as i think its POSIX

Christian Immanuel · 2026-06-27 11:46 · 1650c9c80dbef63307b3d643ccf7389871b661e1

 src/systems/compiler_system.cpp   | 2 +-
 src/systems/dyn_loader_system.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/systems/compiler_system.cpp b/src/systems/compiler_system.cpp
index 1eccf2a..aa4c25e 100644
--- a/src/systems/compiler_system.cpp
+++ b/src/systems/compiler_system.cpp
@@ -48,7 +48,7 @@ CompilerSystem::run_Compile(CompilerSystem* self, std::string src)
     fputs(src.c_str(), f);
     fclose(f);
 
-    FILE* pipe = popen("LC_ALL=C g++ /tmp/game_prog.cpp -o /tmp/game_prog 2>&1", "r");
+    FILE* pipe = popen("LC_ALL=C c++ /tmp/game_prog.cpp -o /tmp/game_prog 2>&1", "r");
     if (!pipe) {
         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "CompilerSystem: popen failed");
         self->_running.store(false);
diff --git a/src/systems/dyn_loader_system.cpp b/src/systems/dyn_loader_system.cpp
index ac878b7..048fa7b 100644
--- a/src/systems/dyn_loader_system.cpp
+++ b/src/systems/dyn_loader_system.cpp
@@ -84,7 +84,7 @@ DynLoaderSystem::build(Text::Handler& out, const std::string& user_src, bool ful
 
     _pending_so = "/tmp/game_mod_" + std::to_string(_build_serial++) + ".so";
 
-    std::string cmd = "LC_ALL=C gcc -shared -fPIC -O0 -I";
+    std::string cmd = "LC_ALL=C cc -shared -fPIC -O0 -I";
     cmd += MOD_INCLUDE_DIR;
     cmd += " ";
     cmd += MOD_SRC_PATH;