From 13ed1d2d9693092f1b243d5c568d3073f9db100d Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sat, 31 Jan 2026 09:25:44 +0900 Subject: [PATCH] fixing --- engine/CMakeLists.txt | 6 ++++-- engine/external/ode/CMakeLists.txt | 2 +- engine/include/GearSrc/Foundation.h | 1 + engine/include/GearSrc/TypeDefs.h | 1 + engine/src/core.c | 3 +++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 1244782..836af8f 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -28,8 +28,10 @@ add_library(GearSrc SHARED ${GearSrc_SRC}) target_include_directories(GearSrc PUBLIC include) target_compile_definitions(GearSrc PRIVATE _GEARSRC) target_link_libraries(GearSrc PRIVATE ode lz4) -target_link_options(GearSrc PRIVATE -static-libgcc -static-libstdc++) -if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + target_link_options(GearSrc PRIVATE -static-libgcc -static-libstdc++) +else() + target_link_libraries(GearSrc PRIVATE stdc++) target_link_libraries(GearSrc PRIVATE m pthread) endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") diff --git a/engine/external/ode/CMakeLists.txt b/engine/external/ode/CMakeLists.txt index 80df6d8..349f9f9 100644 --- a/engine/external/ode/CMakeLists.txt +++ b/engine/external/ode/CMakeLists.txt @@ -12,6 +12,7 @@ file(GLOB ODE_SRC add_library(ode ${ODE_SRC}) target_include_directories(ode PUBLIC ../../submodule/ode/include + ${CMAKE_CURRENT_BINARY_DIR} ) target_include_directories(ode PRIVATE ../../submodule/ode/ode/src @@ -21,7 +22,6 @@ target_include_directories(ode PRIVATE ../../submodule/ode/GIMPACT/include ../../submodule/ode/libccd/src/custom ../../submodule/ode/libccd/src - ${CMAKE_CURRENT_BINARY_DIR} ) list(REMOVE_ITEM ODE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../submodule/ode/ode/src/collision_trimesh_trimesh_old.cpp) diff --git a/engine/include/GearSrc/Foundation.h b/engine/include/GearSrc/Foundation.h index 1221779..62da5ed 100644 --- a/engine/include/GearSrc/Foundation.h +++ b/engine/include/GearSrc/Foundation.h @@ -21,5 +21,6 @@ #include #include #include +#include #endif diff --git a/engine/include/GearSrc/TypeDefs.h b/engine/include/GearSrc/TypeDefs.h index f054227..a0b1fc9 100644 --- a/engine/include/GearSrc/TypeDefs.h +++ b/engine/include/GearSrc/TypeDefs.h @@ -175,6 +175,7 @@ struct _GSNetKV { #ifdef _GEARSRC #include #include +#include struct _GSGL { GSEngine engine; diff --git a/engine/src/core.c b/engine/src/core.c index 60466ca..72dddf0 100644 --- a/engine/src/core.c +++ b/engine/src/core.c @@ -7,6 +7,7 @@ #include #include #include +#include #include @@ -16,6 +17,8 @@ void GSInit(void) { GSVersionGet(&version); GSLog(NULL, GSLogInfo, "GearSrc Engine %s", version.string); + + GSPhysicsInit(); } GSBool GSEngineRegisterResource(GSEngine engine, const char* name, const char* path) {