From 16935f4aebffdd1b6580b844391a0aa0f4f3012b Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期一, 22 四月 2024 10:29:12 +0800
Subject: [PATCH] bug fixed

---
 src/CMakeLists.txt |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8e73250..bda9c44 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,9 +3,15 @@
 
 set(CMAKE_SHARED_LINKER_FLAGS  ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exported_symbols")
 
+# static link c++
+Append(CMAKE_C_FLAGS "-static-libstdc++ -static-libgcc")
+Append(CMAKE_CXX_FLAGS "-static-libstdc++ -static-libgcc")
+Append(CMAKE_CXX_FLAGS_RELEASE "-static-libstdc++ -static-libgcc")
+Append(CMAKE_CXX_FLAGS_DEBUG "-static-libstdc++ -static-libgcc")
+
 include_directories(${CMAKE_SOURCE_DIR}/nng-1.5.2/include)
 
-include_directories(${CMAKE_BINARY_DIR}/proto)
+include_directories(${PROTO_SRC_PATH} ${PROTO_LIB_PATH}/include)
 
 include_directories(${CMAKE_SOURCE_DIR}/protobuf/include)
 

--
Gitblit v1.8.0