Download

Problems compiling classes that inherit from Texture.h

Hey guys,

i’m a newb when it comes to programing UE. I’m having problems with compiling new classes created from Texture Parent Class. Anything else works fine, but when trying to compile Texture derived clases i get errors:

CompilerResultsLog:Error: Error Texture2DArray.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: __cdecl FRenderCommandFence::~FRenderCommandFence(void)” (_imp??1FRenderCommandFence@@QEAA@XZ) referenced in function “public: virtual __cdecl UTexture2DArray::~UTexture2DArray(void)” (??1UTexture2DArray@@UEAA@XZ)
CompilerResultsLog:Error: Error TextureArrays.generated.cpp.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl FRenderCommandFence::~FRenderCommandFence(void)” (_imp??1FRenderCommandFence@@QEAA@XZ)
CompilerResultsLog:Error: Error Texture2DArray.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: virtual __cdecl FTextureReference::~FTextureReference(void)” (_imp??1FTextureReference@@UEAA@XZ) referenced in function “public: virtual __cdecl UTexture2DArray::~UTexture2DArray(void)” (??1UTexture2DArray@@UEAA@XZ)
CompilerResultsLog:Error: Error TextureArrays.generated.cpp.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: virtual __cdecl FTextureReference::~FTextureReference(void)” (_imp??1FTextureReference@@UEAA@XZ)
CompilerResultsLog:Error: Error C:\Users\Jacek\Documents\Unreal Projects\TextureArrays\Binaries\Win64\UE4Editor-TextureArrays-1135.dll : fatal error LNK1120: 2 unresolved externals

I’m not sure, but i think this worked before (like yesterday). Since then i’ve reinstalled the engine with no luck.

I’m on UE4.11.

EDIT: the compilation gives this error even during c++ class creation.

Anyone can help?

i’ll be more specific.

when the class that i create inherits from UTexture i get those errors. When i change the Parent class to UObject the problem dissapears.

So is it a missing linked file or maybe a something that i have to implement.

I get the same issue, did you ever resolve this?

I get the same issue, Is there some one who knows the resolution?

Add “RenderCore” to your dependency modules in your ProjectName.Build.cs file and the build error is gone.


 
 PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore", "RenderCore"});