This repository was archived by the owner on Aug 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "version" : 2 ,
3+ "configurePresets" : [
4+ {
5+ "name" : " linux-default" ,
6+ "displayName" : " Linux Debug" ,
7+ "description" : " Target the Windows Subsystem for Linux (WSL) or a remote Linux system." ,
8+ "generator" : " Ninja" ,
9+ "binaryDir" : " ${sourceDir}/out/build/${presetName}" ,
10+ "cacheVariables" : {
11+ "CMAKE_BUILD_TYPE" : " Debug" ,
12+ "CMAKE_INSTALL_PREFIX" : " ${sourceDir}/out/install/${presetName}" ,
13+ "MIRAI_CPP_BUILD_EXAMPLES" : true
14+ },
15+ "vendor" : {
16+ "microsoft.com/VisualStudioSettings/CMake/1.0" : { "hostOS" : [ " Linux" ] },
17+ "microsoft.com/VisualStudioRemoteSettings/CMake/1.0" : { "sourceDir" : " $env{HOME}/.vs/$ms{projectDirName}" }
18+ }
19+ },
20+ {
21+ "name" : " windows-default" ,
22+ "displayName" : " Windows x64 Debug" ,
23+ "description" : " Target Windows with the Visual Studio development environment." ,
24+ "generator" : " Ninja" ,
25+ "binaryDir" : " ${sourceDir}/out/build/${presetName}" ,
26+ "architecture" : {
27+ "value" : " x64" ,
28+ "strategy" : " external"
29+ },
30+ "cacheVariables" : {
31+ "CMAKE_BUILD_TYPE" : " Debug" ,
32+ "CMAKE_INSTALL_PREFIX" : " ${sourceDir}/out/install/${presetName}" ,
33+ "MIRAI_CPP_BUILD_EXAMPLES" : true
34+ },
35+ "vendor" : { "microsoft.com/VisualStudioSettings/CMake/1.0" : { "hostOS" : [ " Windows" ] } }
36+ }
37+ ]
38+ }
Original file line number Diff line number Diff line change @@ -10,9 +10,11 @@ endif(MSVC)
1010macro (api_exe target )
1111 add_executable (${target} ${target} .cpp)
1212 target_link_libraries (${target} mirai-cpp)
13- # gcc 要连接 pthread
1413 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
15- target_link_libraries (${target} pthread)
14+ # 链接 pthread
15+ target_link_libraries (${target} pthread)
16+ # 静态链接 libgcc 和 libstdc++
17+ target_link_libraries (${target} -static -libgcc -static -libstdc++)
1618 endif ()
1719endmacro ()
1820
You can’t perform that action at this time.
0 commit comments