Skip to content

Commit f6d7b8c

Browse files
committed
fix: use dynamic runtime library (/MD) on Windows MSVC
Fixes linker error caused by mismatch between static (MT) and dynamic (MD) runtime libraries when linking with dependencies like FTXUI.
1 parent 18a80c4 commit f6d7b8c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
77

8+
# Windows: Use dynamic runtime library (/MD) for consistency with dependencies
9+
if(MSVC)
10+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
11+
endif()
12+
813
# Find OpenSSL for HTTPS support
914
find_package(OpenSSL QUIET)
1015
if(OPENSSL_FOUND)

0 commit comments

Comments
 (0)