// FastNoise_Config.h
-#define FASTNOISE_USE_SHARED_PTR false
+#define FASTNOISE_USE_SHARED_PTR true
// The only place I #include FastNoise
define FASTNOISE_STATIC_LIB
include <FastNoise/FastNoise.h>
I was using UnrealCMake to compile FastNoise from source.
Basically, I had to go into the FastNoise2 cloned repo and change the line for #define FASTNOISE_USE_SHARED_PTR false and set it to true, then add #define FASTNOISE_STATIC_LIB above the line #include <FastNoise/FastNoise.h> anywhere I include FastNoise in my project.
If you are receiving the following error when building your C++ project:
error LNK2019: unresolved external symbol "__declspec(dllimport) private: static void __cdecl FastNoise::SmartNodeManager::DecReference(unsigned __int64,void ,void (__cdecl)(void *))" (_imp?DecReference@SmartNodeManager@FastNoise@@CAX_KPEAXP6AX1@Z@Z) referenced in function "private: void __cdecl FastNoise::SmartNode::Release(void)" (?Release@?$SmartNode@VGenerator@FastNoise@@@fastnoise@@AEAAXXZ)
Found a solution here
Quoting from the above link:
Basically, I had to go into the FastNoise2 cloned repo and change the line for
#define FASTNOISE_USE_SHARED_PTR false
and set it totrue
, then add#define FASTNOISE_STATIC_LIB
above the line#include <FastNoise/FastNoise.h>
anywhere I include FastNoise in my project.