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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Coding a plugin using third party code directly in source?

I'm trying to make a plugin that leverages a third-party "library." The problem with that is that the instructions of said library tell me to put its source in with my project's. I can technically build a symbol-less DLL of it, but it does not output a corresponding .lib file with it, nor is there any __dllspec(dllexport) of any kind in the headers. So now my problem is if there's a UBT directive to point to secondary source paths.`PublicIncludePaths` and PrivateIncludePaths are all I know about and they're for header files. UBT's API is not well documented and Github search only does engine-wide searches, which gives hundreds of results to go through.

Product Version: UE 4.21
more ▼

asked Jan 22 '19 at 12:18 PM in C++ Programming

avatar image

Laphicet Crowe
1 1

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

1 answer: sort voted first

You probably want to take a look in the Engine\Source\ThirdParty folder, as there's lots of examples there about setting up a ThirdParty library.

Basically though you just create a new module that hosts a pre-compiled library (ModuleType.External), and then set-up the .Build.cs file for that module to include and link to the correct things, before referencing it as a dependency in your plugin .Build.cs file.

Alternatively, since the library says to do this, you can just put its code inside a sub-folder of your plugin source code and include it from there (or add it as an include sub-path using PrivateIncludePaths or PublicIncludePaths).

more ▼

answered Jan 22 '19 at 02:36 PM

avatar image

Jamie Dale STAFF
7.5k 176 66 304

avatar image Laphicet Crowe Jan 23 '19 at 12:49 AM

Hmm... Well, that's good as far as header files go, but how will UBT be aware of the .cpp files of this library?

avatar image Jamie Dale STAFF Jan 23 '19 at 11:54 AM

If the code is pre-compiled then you don't need the cpp files.

If the code is just dropped in your module then the cpp files will be added to your module like all your other source code is.

avatar image Laphicet Crowe Jan 23 '19 at 11:11 PM

Ah, sounds good. Thanks

(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