UWidgetBlueprintLibrary linking error

Hi!

I get a linking error when I try to call UWidgetBlueprintLibrary::SetInputMode_UIOnly. I have the “UMG”, “Slate” and “SlateCore” modules added in the build file. Is some module missing?

Or where can I find all modules available? Does it exist such documentation?

It works for UUserWidget which seems to even be in the same folders as UWidgetBlueprintLibrary?

Error message:

Error	24	error LNK2019: unresolved external symbol "public: static void __cdecl UWidgetBlueprintLibrary::SetInputMode_UIOnly(class APlayerController *,class UWidget *,bool)" (?SetInputMode_UIOnly@UWidgetBlueprintLibrary@@SAXPEAVAPlayerController@@PEAVUWidget@@_N@Z)

Hi. I’m have same error from here barisatamer (from here [UMG] Button Press & Release - UI - Unreal Engine Forums )

Sorry for the delay, have been busy lately.

Not sure what the problem is, can’t really see any differences in the example. I basically ended up coping the code and compiled it myself. Not an ideal solution when it gets updated but maybe it will work in some future update out of the box.

Those blueprint libraries were not exported from the DLL, so you can’t link against them. I’m changing them for 4.8 to be exported.

Okay, sounds good. Thanks!

Almost one year later but I’m starting with C++ in UE4 and got this error today.
Looking arround the web, I found a forum post about FReply and the solution was to add SlateCore to the public dependency on Build.cs

You need to add “SlateCore” to PublicDependencyModuleNames in Build.cs of your project.

But in this case, the module isn’t SlateCore but UMG

Here is my example of Project.Build.cs

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

Forum post: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1703185-freply-unresolved

Before 4.8, the method was not exported, so that you couldn’t link against it.