FPlatformProcess::GetDllExport() returns NULL

FPaths::FileExists() returns true;

FPlatformProcess::GetDllHandle() succeeds…

FPlatformProcess::GetDllExport() returns NULL.

I was following the getCircleArea (A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums) tutorial.

Any help is appreciated, thanks!

I’m having the same problem…

I had the same problem, It boiled down to C++ name mangling. Basically, C++ needs to turn all your identifiers(for functions, classes, etc…) into unique identifiers for reasons, so it appends additional information to the names to make them truly unique.
I.E. it turns this:

int TestFunction(int)

into this:


You can see this if you view the exports from your DLL (You can dump/view the binary yourself, or get the DLL export viewer).

There are two solutions to the name mangling problem (that I’ve found). The first is to tell the compiler to compile your code as C instead of C++ using:

extern “C”
//Your code here

The second is to add a .def file, which eliminates the need for name mangling.

Name Mangling
Adding .def files
DLL export viewer

Thank you very much!

even if i export code like :

extern "C"
//Your code here

i still cannot import method