archlinux-arm镜像测速
tw2.mirror.archlinuxarm.org 10MB/s
ca.us.mirror.archlinuxarm.org 18MB/s
tw2.mirror.archlinuxarm.org 10MB/s
ca.us.mirror.archlinuxarm.org 18MB/s
表现为操作卡顿、联网卡顿,
使用 wakelock 锁,shell 中输入:
1 | # 获取 su 权限 |
Wi-Fi 进入节能模式
表现为不能全速传输,延时高。
1 | # 查询节能状态 |
1 | set(Boost_DEBUG 1) |
1 | Could NOT find Boost (missing: program_options system) (found suitable version "1.70.0", minimum required is "1.65.0") |
Installing boost on Windows using MinGW-w64 (gcc 64-bit)
在CMakeLists.txt中set(Boost_DEBUG 1)
打印信息
1 | Searching for SYSTEM_LIBRARY_RELEASE: boost_system-mgw13-mt-1_83;boost_system-mgw13-mt;boost_system-mgw13-mt;boost_system-mt-1_83;boost_system-mt;boost_system-mt;boost_system-mt;boost_system |
找不到文件名,所以修改C:\boost\lib
中的文件名称libboost_system-mgw13-mt-d-x64-1_83.dll.a
更改为libboost_system-mgw13-mt-1_83.dll.a
,libboost_program_options-mgw13-mt-d-x64-1_83.dll.a
更改为libboost_program_options-mgw13-mt-1_83.dll.a
。
这里使用的是动态链接库
使用静态链接库:将libboost_program_options-mgw13-mt-sd-x64-1_83.a
改名为libboost_program_options-mgw13-mt-1_83.a
。
可选的:在CMakeLists中set(Boost_USE_STATIC_LIBS ON)
1 | [cmake] Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the |
在CMakeLists.txt中添加
1 | set(OPENSSL_ROOT_DIR "C:/Program Files/OpenSSL-Win64") |
1 | [cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message): |
版本Win64OpenSSL-3_2_0缺少lib文件,安装Win64OpenSSL-3_1_4版本即可
1.安装mingw64并将其加入path环境变量
2.解压boost.7z到Program Files
3.cd "C:\Program Files\boost_1_83_0\tools\build"
4.构建b2:bootstrap.bat gcc
5.安装Boost.Build:b2 --prefix="C:\boost-build" install
6.构建需要的library,使用–with-library_name
1 | .\tools\build\b2.exe --build-dir="C:\Program Files\boost_1_83_0\build" --with-program_options toolset=gcc install |
1 | po::options_description desc("Allowed options"); |
help,h
之间不能有空格,否则识别不出-h
参数
1 | $ g++.exe -I "C:\Program Files\boost\" hello.cpp |
需要将\
改为\\
或者/
1 | g++.exe -I "C:/Program Files/boost/" hello.cpp |
Ctrl+Alt+p:选择c/c++编辑配置
=>包含路径(includePath)
=>换行添加
然后在.vscode/tasks.json
中添加includePath,就能使用F5运行项目
1 | { |
删除文件夹下的.vscode
后,将头文件目录放到includePath下面