Unresolved external symbol UUserWidget

Hi, I followed this guide for converting my Blueprint project to C++.

All went well until the last step (build Development project in Visual Studio) when I get ‘unresolved external symbol’ errors all related (afaict) to UUserWidget.

This previous answer talks about removing “MinimalAPI” metadata from WidgetComponent.h, but I cannot find any references to it. Relevant lines in WidgetComponent.h:

UCLASS(Blueprintable, ClassGroup="UserInterface", hidecategories=(Object,Activation,"Components|Activation",Sockets,Base,Lighting,LOD,Mesh), editinlinenew, meta=(BlueprintSpawnableComponent) )
class UMG_API UWidgetComponent : public UMeshComponent

It also involves editing the engine’s source code, which isn’t ideal.
One comment by AskNinja says "change UWidgetComponent.h to use the UMG_API " which I don’t know how to do.
Any ideas?

Thanks in advance,
Darren.

Edit: attached error log

It’s possible you needed to add the “UMG” module to your game module’s dependencies. Check out this page near the bottom:

https://docs.unrealengine.com/latest/INT/Programming/Tutorials/UMG/1/

I just ran into something similar myself in version 4.17.1 trying to add a UUserWidget * UProperty.

3 Likes

Thanks! This fixed my issue 5 years later :stuck_out_tongue: