Hi guys. I’m trying to do this: UMGExtensionLibrary.cpp · GitHub
But everytime I try to create the widget renderer with this code:
FWidgetRenderer *r = new FWidgetRenderer(bUseGameCorrection);
I got this error on the image:
I commented every other lines, and I know the error is exactly when I try to construct the new FWidgetRenderer. How to solve this?
There 3 most common reasons of “unresolved symbol” errors that oyu should check
-You don’t have added dependency to module where function is that you called or linker needs indirecly
-Function is declared (mostl ikely in in header) but not defined (no code for it), this is error most likely done by developer instead of engine code
-Class is marked as MinimalAPI or been declared in private folder, which results that module dll don’t have symbol link point and linker don’t have anywhere to link to, this can be solved only by modifying engine code and rebuilding it on your own, which might ot be big deal for game, but it prevents to do functional plugin that needs to run on standard build of engine.
In you case it is most likely first case, the FDeferredCleanupInterface is part of “RenderCore” module so you need to add dependency in to build script of your module (*.Build.cs file), add it to array where you see
"Core", "CoreUObject",. If you at it make sure you have also added “Slate”, “SlateCore” and “UMG” if you play with widget systems in UE4.
Anytime you have linker error from engine function search the class it belongs to in API refrence and look on bottom of thep age, you will see module name where class code sit in and oyu need to add it to dependencies if you plan to communicate with it, there also possibility to catch those linker errors if some other code like from macros for example use those functions: