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"

Shipping plugin with ThirdParty lib with libCURL


I have a .lib (let' call it "happy.lib" - it is a pretty large project that communicates with a server, database, stores data onto a drive etc. and it has a few third party dependencies - one of them is a libCURL. I add the happy.lib with all the dependencies it needs into the plugin as PublicAdditionalLibraries (the libraries) and PublicIncludePaths (the headers).

...and around the happy.lib, I am developing a plugin, that propagates some of that functionality into the Unreal Editor so it can be easily used in a blueprint.

I also need to be able to package the result into an executable and that is the problem:

  • If I build the plugin in: Development editor configuration, the build is successful, I can run the Editor, create a blueprint and happily work with the functions provided by the plugin - that works OK.

  • If I build the plugin in: Shipping configuration, the build fails reporting the following error in every object file from the happy.lib that uses a reference into the libCURL header files: curl_easy_cleanup already defined in libcurl_a.lib(easy.obj) - thus the libCURL linked by me is conflicting with the libCURL provided by Unreal Engine.

  • If I remove the dynamically linked libCURL that I added as a dependency with the happy.lib, the build is successful-ish (a reference to the static libCURL library is used) with linker warnings: LNK4049 locally defined symbol 'symbol' imported BUT at the same time, I cannot build in the Developement editor configuration (Unresolved external symbols) and even if I package the game, it does not work (from logs from happy.lib and Wireshark I found out that a first message (that opens a connection with a server) is send to the server, response is returned successfully but the client (Unreal/plugin) receives an empty message even though the server sent correct message.

  • The only working solution I have now is that in libcurl.Build in Engine/Source/ThirdParty/libcurl I comment out these lines: PublicAdditionalLibraries.Add("libcurl_a.lib"); Definitions.Add("CURL_STATICLIB=1"); That prevents the libCURL to be available in the Engine and the Unreal then lets me use the libCURL I provided. The build in both configurations works fine, so does the packaging and the game.

My question is: Is there a way to nicely suppress the libCURL in the Engine without modifying the Unreal Engine (prehaps in the .ini config files)? Is there a better way to do this?

Thank You very much for your time! :)


Product Version: UE 4.12
more ▼

asked Aug 17 '16 at 10:15 AM in C++ Programming

avatar image

1 2 1

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

0 answers: sort voted first
Be the first one to answer this question
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