x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

cpprestsdk within unreal engine

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.

Product Version: UE 4.18
Tags:
more ▼

asked Mar 04 '18 at 09:13 PM in C++ Programming

avatar image

LifeArtist
47 8 13 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

I also am getting these errors. Exact same setup. Did you get this resolved?

more ▼

answered Oct 02 '18 at 05:49 PM

avatar image

4nof
16 1 2 4

avatar image LifeArtist Oct 02 '18 at 06:09 PM

I was not able to get it to work. However I was able to use the FHttpModule which comes with unreal. Http-requests is a great example on how you can use this module. This should be a good start for you!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

In case someone else stumbles onto this problem... You can get around it by adding your own definition for CPPREST_FORCE_PPLX in the .build.cs file:

 PublicDefinitions.Add("CPPREST_FORCE_PPLX=0");

more ▼

answered Mar 06 '19 at 05:04 PM

avatar image

KrisJelbring
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question