Hello Julian. Thanks for the info. I was able to put some break points in the code.
The errors went away when I added the following line to my game.build.cs and plugin.build.cs file.
CppStandard = CppStandardVersion.Cpp20;
However, I had to modify the engine under D:\UE5.6\Engine\Source\Programs\UnrealBuildTool\Platform\Windows\VCToolChain.cs.
I had to add this single line to fix some char8_t conversion errors. (Some of the libraries that our plugin use still does not support this cpp20 feature.)
switch (CompileEnvironment.CppStandard) { case CppStandardVersion.Cpp17: Arguments.Add("/std:c++17"); break; case CppStandardVersion.Cpp20: Arguments.Add("/std:c++20"); Arguments.Add("/Zc:char8_t-"); //** This is the line added to fix some errors. break; case CppStandardVersion.Latest: Arguments.Add("/std:c++latest"); break; default: throw new BuildException($"Unsupported C++ standard type set: {CompileEnvironment.CppStandard}"); }
Originally in my editor.target.cs file, I had the following additional compile arguments added.
AdditionalCompilerArguments += "/std:c++20 /Zc:char8_t-";
However, for UE5.6, the above line did not help in fixing the issue we were discussing.
I don’t want to modify the engine file to get this working, since the plugin we are building is used by many game teams and we cant force them to change the engine files.
My question is, is there any way I can pass the compile arguments through plugin.build.cs file while building the plugin. It seems the ModuleRules with which the plugin is derived from, does not have AdditionalCompilerArguments variable to hold the compile arguments.