Hey,
I am currrently trying to use the cpprestapi together with unreal engine but unfornutally I always get errors while compiling. Here is the error log:
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\pplx/pplxtasks.h(19) : warning C4668: 'CPPREST_FORCE_PPLX' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\pplx/pplxtasks.h(19) : warning C4668: 'CPPREST_FORCE_PPLX' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\cpprest/json.h(304) : warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '['
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\cpprest/json.h(304) : warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '['
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\cpprest/details/web_utilities.h(36) : warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '['
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\cpprest/http_client.h(760) : warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '['
CompilerResultsLog: Error: [...]\vcpkg\installed\x64-windows\include\cpprest/details/web_utilities.h(36) : warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '['
CompilerResultsLog: Error: [...]vcpkg\installed\x64-windows\include\cpprest/http_client.h(760) : warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '['
CompilerResultsLog: c:\program files (x86)\microsoft visual studio 14.0\vc\include\ppltasks.h(4321) : error C4868: compiler may not enforce left-to-right evaluation order in braced initializer list
CompilerResultsLog: c:\program files (x86)\microsoft visual studio 14.0\vc\include\ppltasks.h(4321) : error C4868: compiler may not enforce left-to-right evaluation order in braced initializer list
CompilerResultsLog: ERROR: UBT ERROR: Failed to produce item: [...]\Binaries\Win64\UE4Editor-MyShooter-824.dll
CompilerResultsLog: Total build time: 25,51 seconds (Local executor: 0,00 seconds)
I have installed cpprestapi with the vcpkg manager.
My .build.cs looks like this:
PublicIncludePaths.Add([...]/vcpkg/installed/x64-windows/include");
I have also added this folder to the NMake include dir list and in the normal vs one.
Compiling a minimal c++ project without unreal engine works flawless.
The #include <cpprest/http_client.h>
gets called within the derived GameInstance class.