[Engine] Adding to pre-existing included library (IntelTBB)

I’m trying to use IntelTBB in my own work, but I actually need access to their task system etc, not just the allocator provided in default UE4.

I’ve tried adding the .lib files to the \ThirdParty\IntelTBB\IntelTBB-4.0\lib\Win64\vc12 folder, and adding in to the .build.cs, underneath the pre-existing lib code for tbbmalloc.lib:

string LibName2 = "tbb";
if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
{ 
    LibName2 += "_debug";
}
LibName2 += ".lib";
PublicAdditionalLibraries.Add(LibName2); 

This part has worked (mostly… sometimes I just get “Error : Failed to generate code for UE4Game - error code: -1073741515 (-1073741515)” over and over every time I try to build UE4) but I can’t get it to run without manually placing the .dll files in the working directory.

Obviously UE4 is handling the use of .dll files already, so I tried to tap into that by adding PublicDelayLoadDLLs.Add(LibName2 + “.dll”); to the above section before the += “.lib” line, but again started getting errorcode -1073741515.

What’s even more perplexing is that I can’t find the tbbmalloc.dll file in UE4 at all. How the hell is it using this functionality without the .dll file, when I have to manually place it. They’re not even using the build.cs to copy or incorporate it automatically… it just isn’t there!

Any advice on how to add the additional .dll and .lib files to the IntelTBB ThirdParty directory and have them linked in and part of the engine would be super helpful. (Having to place the .dll files manually would be a pain, especially in the editor configurations… and oh god, what about packaged games!)

Thanks!

EDIT: Also, what bloody version is UE4 using? It says 4.0 but that’s unlikely - you wouldn’t have the vc12 folder then! I’m betting 4.3… but which subversion of that?