Compile error "Undefined symbols for architecture x86_64:"

Hej, I’m getting a similar error to this

Adding the line in Build.cs doesn’t work unfortunately. Any other module I have to add there?

[1/4] Compile MyComponent.cpp


[2/4] Link UE4Editor-MyProject-Mac-Debug.dylib


Undefined symbols for architecture x86_64:


  "FRenderResource::InitResource()", referenced from:


      vtable for FTexture in MyComponent.cpp.o


  "FRenderResource::ReleaseResource()", referenced from:


      vtable for FTexture in MyComponent.cpp.o


  "FRenderResource::~FRenderResource()", referenced from:


      FTexture::~FTexture() in MyComponent.cpp.o


ld: symbol(s) not found for architecture x86_64


clang: error: linker command failed with exit code 1 (use -v to see invocation)


-------- End Detailed Actions Stats -----------------------------------------------------------


ERROR: UBT ERROR: Failed to produce item: /Users/MyProject/Binaries/Mac/UE4Editor-MyProject-Mac-Debug.dylib


Cumulative action seconds (8 processors): 0.00 building projects, 5.15 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.79 linking, 0.00 other


UBT execution time: 67.68 seconds


Command /Users/myUser/programs/UnrealEngine/Engine/Build/BatchFiles/Mac/Build.sh failed with exit code 2

I have tried to run verbose mode to find out something more, but I have no idea how to (as said in line 31 of the above log)…

I have sorted it out.

In MyProject.Build.cs the line has to say:

PrivateDependencyModuleNames.AddRange(new string[] { "RenderCore" });

: )