Repository navigation
V2.0.0
CrucibleCpp Preprocessor V2.0.0
第二个公开发行版本。
新功能
- 从
PATH自动发现 GCC:g++.exegcc.exec++.exe
- 执行
g++ -std=c++20 -E -v -x c++ -,解析 GCC 的隐式 include 搜索列表。 #include <...>现在可以直接使用标准库头,不需要手动传-isystem。--print-gcc-includes打印发现结果。-nostdinc/--no-gcc-includes关闭自动发现。-v打印 GCC 路径、版本和 include 目录。
搜索顺序
#include "..."
当前文件目录
→ -I
→ -isystem
→ PATH 中 GCC 的 include 目录
#include <...>
-I
→ -isystem
→ PATH 中 GCC 的 include 目录
<> 仍然不搜索当前文件目录。
示例
.\cruciblecpp-preprocessor.exe -P main.cpp -o main.i
g++ -std=c++20 -O2 main.i -o main.exe查看 GCC 路径:
.\cruciblecpp-preprocessor.exe --print-gcc-includes验证
- 34 个 CTest。
- 无显式
-isystem的<vector>/<string>/<iostream>测试。 -nostdinc负例。<windows.h>和用户main.cpp回归。- 完整静态 Windows x64 发行包。
许可证
MIT,见 LICENSE。
下载
cruciblecpp-preprocessor-v2.0.0-win64.zip— 完整包cruciblecpp-preprocessor.exe— 仅可执行文件SHA256SUMS.txt— 校验和
SHA-256
2a3333b41aa383c794f410078e73d1923ced45b3e5386331ce70954563dc0a3d cruciblecpp-preprocessor.exe
65e7b2a8be3fb42759416fcd078100eaf7c958343f42d49b0f5cb61ea0333e0d cruciblecpp-preprocessor-v2.0.0-win64.zip