Precompiled Header and MSBuild

限于喜欢 提交于 2020-01-04 01:20:11

问题


I have a precompiled header that needs to be included atop each .cpp in my project. I fear that I will waste a lot of time explaining and fixing that in coworkers code.

Is there an MSBuild step that I can do to #include "stdafx.h" at the top of all my .cpp files so it dosen't need to do done manually?


回答1:


You have the compiler option /FI pathname

which virtually add #include "pathname" at the first line of the file.

Note: the equivalent for gcc is -include path.



来源:https://stackoverflow.com/questions/26781630/precompiled-header-and-msbuild

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!