So I tried to include this : #include “Editor/UnrealEd/Public/FileHelpers.h” and #include “FileHelpers.h” in the cpp file.
I also tried without “FileName” but it’s all the time the same Error “LNK2018”
Error:
error LNK2019: unresolved external symbol “__declspec(dllimport) public: static bool __cdecl FEditorFileUtils::SaveLevelAs(class ULevel *,class FString *)” (_imp?SaveLevelAs@FEditorFileUtils@@SA_NPEAVULevel@@PEAVFString@@@Z) referenced in function “private: static void __cdecl UInsaneFunctionLib::createLevelR(class FString &,class FName)” (?createLevelR@UInsaneFunctionLib@@CAXAEAVFString@@VFName@@@Z)
c:\a_BatchFolder\return\HostProject\Plugins\Binaries\Win64\UE4Editor-.dll : fatal error LNK1120: 1 unresolved externals
ERROR: UBT ERROR: Failed to produce item: c:\a_BatchFolder\return\HostProject\Plugins\Binaries\Win64\UE4Editor-.dll
Total build time: 27,20 seconds (Local executor: 0,00 seconds)