electronicarts/EAStdC

Compile errors in VS2019 when using C++latest / C++20

Opened this issue · 0 comments

RicoP commented

When building the project using cmake I get the following error when I try to compile the project using Visual Studio 2019

C:\repo\EAStdC\test\packages\EAMain\source\EAMain.cpp(175,64): error C2665: "EA::StdC::Strlen": Couldn't find fitting function signature [C:\repo\EAStdC\out\test\packages\EAMain\EAMain.vcxproj]

The reason is that by default cmake builds using the latest C++ version (std:c++latest).
VS2019 broke some compatibility with char* types. https://docs.microsoft.com/en-us/cpp/overview/cpp-conformance-improvements?view=vs-2019&WT.mc_id=twitter#improvements_161

To fix this error you must supply overloads of all string operations for char8_t or change the build script to use C++17 by default.

Greetings.