I see in Unreal Engine’s Source directory there are a number of third party tools. How do we use them in our projects? For example, I tried to run sample code straight from libcurl’s website, but it won’t work. Pressing compile into the editor says libcurl can’t be found. I am new to C++, anyone willing to help? Thank you!
First and for most you should use UE4 APIs as much as you can, there 99% compatible with UE4 types making things a lot easier, all you see in ThirdParty as libraries used in UE4 and power of it is accessable thru UE4 APIs. UE4 provide HTTP APIs it is where libcurl is used by UE4, here is example how to use it:
But if you really want to use libcurl, looking on HTTP module you just need to add this depency in to build script (*.cs file)
AddThirdPartyPrivateStaticDependencies(Target, "libcurl");
And do those includes in cpp:
#include "Curl/CurlHttp.h"
#include "Curl/CurlHttpManager.h"
Thanks for taking the time answer. I am getting this error: fatal error C1083: Cannot open include file: ‘Curl/CurlHttp.h’: No such file or directory. I placed this in the correct place, right?
AddEngineThirdPartyPrivateStaticDependencies(Target, “libcurl”);
AddEngineThirdPartyPrivateStaticDependencies(Target, “OpenSSL”);
it doesn’t helped to me. I was trying to run basic curl c++ script uploading audio to server and receiving server response as a data. And the same script i am trying to run on ue4. But there is no library as #include , i tried to add AddEngineThirdPartyPrivateStaticDependencies(Target, “libcurl”);
AddEngineThirdPartyPrivateStaticDependencies(Target, “OpenSSL”); to MyProject.Build.cs but it does brings a list of errors
Long list of errors which i am receiving by adding AddEngineThirdPartyPrivateStaticDependencies to build.cs empty thirdperson c++ project
my ue4 version is 4.23 on mac OS, if it is matters. I want to run a sample c++ code on ue4 project, http solutions which does have ue4 is not enough for now
Also, need to build project with Engine sources. I’ve spent a couple hours to remember this yesterday, when upgrading project