UE5.1 C++, trouble loading .dll (FastNoise2) build with UE4CMake

Hey everyone,

i am currently facing problems trying to use a .dll that i build with UE4CMake. Funnily enough i had it working for just the use in Editor till i tried to package the project and it broke completely.

The library i am trying to use is FastNoise2, which is actually featured as an example by UE4CMake which sadly didn’t help me. I have followed the example and instructions and anded up with the current configuration:

Build.cs :

CMakeTarget.add(Target, this, "FastNoise", Path.Combine(this.ModuleDirectory, "../FastNoise2"), "-D FSTNOISE2_NOISETOOL=OFF -D FASTNOISE2_TESTS=OFF -D BUILD_SHARED_LIBS=ON"); PublicDelayLoadDLLs.Add("FastNoise.dll"); PublicIncludePaths.Add("PROJECTPATH\\Intermediate\\CMakeTarget\\FastNoise\\build\\FastNoise\\src\\Release\\");

PublicDelayLoadDLLs is there as a test and so that i can continue working as long as i don’t want to use the library. I do know, that this option needs an additional thunk function, which, to be honest, i haven’t tried to make yet as i couldn’t find a guide or example how to do it properly. As far as i understand it, UE4CMake makes this unnecessary however.

I double checked the directories/paths several times and they are correct, i can physically find the FastNoise.dll too. I tried PublicIncludePaths, although i can see the Path being added by UE4CMake, because i can not see Unreal searching this directory inside the Engine Log:

LogWindows: Failed to load 'PROJECTPATH/Binaries/Win64/UnrealEditor-Minesweeper.dll' (GetLastError=126) 
LogWindows: Missing import: FastNoise.dll LogWindows: Looked in: ../../../Engine/Binaries/Win64
...

Would this maybe just not log here ?

Build Output:

Add library path: "PROJECTPATH/Intermediate/CMakeTarget/FastNoise/build/FastNoise/src/Release"

.uproject:

{ "Name": "CMakeTarget", "Enabled": true },

Any help or hint would be greatly appreciated.

FYI. UE4CMake does/did not work with > UE5.1 by the time tested it. Unreal changed a functions return type which the plugin not yet handles. Therefore i am on 5.1 currently.