From 0970a2350132fe3cc6349a1e94fcf4d12aec404a Mon Sep 17 00:00:00 2001 From: DawnMagnet Date: Sat, 22 Mar 2025 11:05:33 +0800 Subject: [PATCH] add static linking --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5629f8c..8a09da2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(cpp_example) +# static linking +set(CMAKE_EXE_LINKER_FLAGS "-static") add_executable(cpp_example main.cpp) \ No newline at end of file