且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何仅对某些(#if /#endif)指令应用C预处理器?

更新时间:2021-08-02 22:43:41

您可能正在寻找类似 coan 的工具:

You might be looking for a tool like coan:


Coan是一个软件工程工具,用于分析基于预处理器的C或C ++源代码配置。它的主要用途是通过消除对于指定配置多余的任何部分来简化一部分源代码。

Coan is a software engineering tool for analysing preprocessor-based configurations of C or C++ source code. Its principal use is to simplify a body of source code by eliminating any parts that are redundant with respect to a specified configuration.

设计为处理 #if #ifdef 预处理器行,并相应地删除代码,但它有很多其他可能使用。

It's precisely designed to process #if and #ifdef preprocessor lines, and remove code accordingly, but it has a lot of other possible uses.