开发者

Is there a way to look at the preprocessor expanded file in C

I want to know how could we look at the C file after it has been expanded by the preprocessor before compilation with all the macro values put in the code inside the开发者_如何学Go function where ever they are used. Is there a way to do it?


You can ask gcc to do it for you gcc -E yourfile.cpp

That will expand macros and include files, all the preproccessing.


Just run it through cpp:

cpp file.c
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜