amazon-gamelift-plugin-unreal icon indicating copy to clipboard operation
amazon-gamelift-plugin-unreal copied to clipboard

Clang compilation in Windows fails.

Open pcf-cmroche opened this issue 6 months ago • 4 comments

Using Clang compilation for Windows targets, which can be enabled like so from the project Target.cs.

WindowsPlatform.Compiler = WindowsCompiler.Clang;

Fails due to rapidjson not handling MSVC_VER still being defined, and pushing warning codes that don't exist in Clang. The solution is to reorder the various if blocks disabling warning to check for clang first.

For example, from meta.h

#if defined(__GNUC__) || defined(__clang__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
#elif defined(_MSC_VER)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(6334)
#endif

pcf-cmroche avatar Jun 07 '25 20:06 pcf-cmroche