Compiling a project (VS 2008) with the /p argument (preprocess to a file) doesn't compile

前端 未结 2 1410
心在旅途
心在旅途 2021-01-27 20:11

I have a project in C++ that I would like to view the preprocessor output to see what some #defines and macros would look like. I tried the /p switch to turn on th

2条回答
  •  花落未央
    2021-01-27 20:47

    Are all the other options (like /I) still the same when you compile with /p? It sounds like it's not picking up your header files. Alternately because it's trying to pre-process all the includes it's no longer generating the stdafx.h precompiled header - you could try just including all the needed headers directly instead of that.

提交回复
热议问题