How do I see a C/C++ source file after preprocessing in Visual Studio?

前端 未结 10 892
一个人的身影
一个人的身影 2020-11-22 05:44

Let\'s say I have a source file with many preprocessor directives. Is it possible to see how it looks after the preprocessor is done with it?

10条回答
  •  不要未来只要你来
    2020-11-22 06:18

    Right-click on the file on the Solution Explorer, goto Properties. Under Configuration Properties->C/C++->Preprocessor, "Generate Preprocessed File" is what you are looking for. Then right-click on the file in the Solution Explorer and select "Compile". The preprocessed file is created in the output directory (e.g. Release, Debug) with an extension .i (thanks to Steed for his comment).

提交回复
热议问题