From d218b89316270914f3d9a36457700619a0128202 Mon Sep 17 00:00:00 2001 From: taynpg Date: Wed, 8 Jan 2025 14:36:03 +0800 Subject: [PATCH] =?UTF-8?q?doc=EF=BC=9A=E6=9B=B4=E6=96=B0=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E6=96=87=E6=A1=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 6cae757..af19b2a 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,26 @@ D:/截图/Ni.jpg|/home/zhangsan/picture # 注意 - 如果两个`tsc`客户端在同一台机器上同时收发同一个文件将导致文件丢失损坏。 + +# 编译 + +当前项目支持`xmake`和`cmake`构建工具。 + +## 1.常规编译 + +xmake:`xmake`。 + +cmake:`cmake -Bbuild -DCMAKE_BUILD_TYPE=Release`、`cmake --build build --config Release`。 + +## 2.XP系统编译 + +### 前提 + +- `cmake`支持windows XP的版本过低,故使用`xmake`。 +- 支持`XP`的`msvc`编译器不支持新`C++语法标准`,故使用`mingw32`编译器。 +- 支持`xp`的`mingw32`编译器的`c++17`标准的`filesystem`模块还是实验性质且有编译`BUG`,故使用`boost-filesystem`。 + +### 编译 + +- 构建选项:`xmake f -p mingw -a i386 --boost=y` +- 环境变量定义:`BOOST_HEADER_DIR`、`BOOST_LIB_DIR`、`BOOST_LIBS`。