C++ EKeys Compile Error

I have next line in my code

EKeys::LeftMouseButton

Also I included InputCoreTypes.h

But I receive a compile error:

[2023.07.14-19.44.23:330][746]CompilerResultsLog: Error: InventoryItem.cpp.obj : error LNK2019: ?뫪? ?? ??ࠧ???譨? ᨬ??? “__declspec(dllimport) public: __cdecl FKey::FKey(struct FKey const &)” (_imp??0FKey@@QEAA@AEBU0@@Z) ? ???樨 “protected: virtual class FReply __cdecl UInventoryItem::NativeOnMouseButtonDown(struct FGeometry const &,struct FPointerEvent const &)” (?NativeOnMouseButtonDown@UInventoryItem@@MEAA?AVFReply@@AEBUFGeometry@@AEBUFPointerEvent@@@Z).
[2023.07.14-19.44.23:330][746]CompilerResultsLog: Error: InventoryItem.cpp.obj : error LNK2019: ?뫪? ?? ??ࠧ???譨? ᨬ??? “__declspec(dllimport) public: static struct FKey const EKeys::LeftMouseButton” (_imp?LeftMouseButton@EKeys@@2UFKey@@B) ? ???樨 “protected: virtual class FReply __cdecl UInventoryItem::NativeOnMouseButtonDown(struct FGeometry const &,struct FPointerEvent const &)” (?NativeOnMouseButtonDown@UInventoryItem@@MEAA?AVFReply@@AEBUFGeometry@@AEBUFPointerEvent@@@Z).
[2023.07.14-19.44.23:330][746]CompilerResultsLog: Error: D:\Projects\roleplay\game\Plugins\InventoryPlugin\Binaries\Win64\UnrealEditor-InventoryPlugin-0198.dll : fatal error LNK1120: ??ࠧ??? ???譨???⮢: 2

How can I get FKey - Left Mouse Button?

I got a solution:

Also include this:

include “Framework/Application/SlateApplication.h”

And in Build.cs

PrivateDependencyModuleNames.AddRange(new string[]
            {
				//...
				"InputCore"	
			}
1 Like