FGenericPlatformProcess Link error

Hi guys,

While packaging my plugin i get the following link error :

error LNK2019: unresolved external symbol "__declspec(dllimport) public: static wchar_t const * __cdecl FGenericPlatformProcess::BaseDir(void)" (__imp_?BaseDir@FGenericPlatformProcess@@SAPEB_WXZ)

i suppose i need to link a module in the build.cs, but which one?

Thank you!

It’s wild guess so i might be wrong as i didnt seen your code. Use FPlatformProcess not FGenericPlatformProcess, FGenericPlatformProcess is just generic implmentation. all FPlatform classes contain platfrom specifc code and each implementation has own version of those classes like this FNamePlatform the “Name” is name of the platform, “Generic” contain fallback code if platform don’t have that class implemented and it will build on any platform.

When you compile the code all those classes are properly aliased to FPlatfrom* naming, so you should use FPlatform* classes. I probably got confused by API reference, it is auto generated and it does not capture aliasing and “Generic” implementation classes are only once that appper in there. So just remove “Generic” part from class name and you should be fine.

Thank you a lot!

I’ve used the following include :
“Runtime/Core/Public/HAL/PlatformProcess.h”

And the following code:

FString Test = FPlatformProcess::BaseDir();

Everything works like a charm!Many many thanks!