UE4 – Linking DLL

— This way Didn’t work —¬†

[1] Add include path, dll, lib in ProjectName.Build.cs

PublicIncludePaths.AddRange(
new string[] {
// … add public include paths required here …
INCLUDE_PATH
}
);

PublicDelayLoadDLLs.Add(@”CUSTOM_DLL.dll”);
PublicAdditionalLibraries.Add(@”CUSTOM_DLL.lib”);

 

[2] Copy .dll and .lib in ProjectFolder/Binaries/Win64/

  • If .dll is missing
    • UE4 shows the error message “Missing import” in the output window
    • Compile button in the Editor disappears

 

 

  • Type casting from FString to char
    • FString s;
    • char *c = TCHAR_TO_ANSI(*s);

 

Leave a Reply