sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
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.gzUse c++ and cc as i think its POSIX
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;