本帖最后由 Covio 于 2017-3-7 16:30 编辑
大家好,我用的是4.15的源码版,从商城里面下载了4.15对应的varest插件之后,放到引擎的插件目录里面,然后编译提示类似 “Expected VaRestJsonObject.h to be first header included”几个这种错误,提示让把头文件放到第一的位置,但是真的把头文件都放过去了,会报更多的错误出来,4.14里面我也用过这个插件,是没问题的,求帮助
找到问题了,是因为4.15添加了一个IWYU的规则,原文如下:
NEW: FASTER C++ COMPILE TIMESThe Unreal Engine 4 codebase now compiles up to 50% faster! Header files only include other headers they need, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h - we call this Include What You Use (IWYU). The conventions for the new model are as follows: Every header now includes everything it needs to compile - There is a CoreMinimal.h header that contains a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...), which is now included first by most headers. Every .cpp file includes its matching .h file first - This helps validate that each header is including everything it needs. UnrealBuildTool will check that source files adhere to this convention. No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more - You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. No engine code explicitly includes a precompiled header any more - We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
Note: You can set ‘bEnforceIWYU = false’ from a *.build.cs file (or through the global BuildConfiguration.xml file) to disable warnings or errors about violations of these rules.
|