其他分享
首页 > 其他分享> > 是否有独立的C源预处理器?

是否有独立的C源预处理器?

作者:互联网

是否有独立的C预处理器?我不需要编译器/链接器,我无法安装完整的工具包.

我希望能够获得一些标题的预处理版本,使用一些定义和包含我提供的路径.

编辑:我不能依赖任何可用的东西.没有cl,没有gcc,没什么.至少我需要做的是处理宏(特别是#ifdef和#if).

编辑:我在Windows XP计算机上使用它.

解决方法:

cpp是你正在寻找的.不过,我不确定它是否可以在gcc发行版之外

CPP(1)                                                                 GNU                                                                 CPP(1)

NAME
       cpp - The C Preprocessor

SYNOPSIS
       cpp [-Dmacro[=defn]...] [-Umacro]
           [-Idir...] [-Wwarn...]
           [-M|-MM] [-MG] [-MF filename]
           [-MP] [-MQ target...]
           [-MT target...]
           [-P] [-fno-working-directory]
           [-x language] [-std=standard]
           infile outfile

Only the most useful options are listed here; see below for the remainder.

DESCRIPTION
       The C preprocessor, often known as cpp, is a macro processor that is used automatically by the C compiler to transform your program before
       compilation.  It is called a macro processor because it allows you to define macros, which are brief abbreviations for longer constructs.

标签:c,windows,c-preprocessor
来源: https://codeday.me/bug/20190928/1829603.html