Unresolved external symbols in Slate

#InputCoreTypes.h

Try including this in your .h file!

//Input
#include "InputCoreTypes.h"

also make sure your new build cs has this

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

#:heart:

Rama

I’m currently trying to move my slate hud over from the beta version to the new version. I think I’ve gone through and updated all the necessary code (Though there’s a bunch of style stuff seemingly missing) but when I try to compile I get a bunch of lnk2019 errors which complain about FKey functions, but all I have in my code is two instances of this line:

if(MouseEvent.GetEffectingButton() != EKeys::LeftMouseButton)

Does anyone have an idea where these errors are coming from?

Error	1	error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl FKey::FKey(void)" (__imp_??0FKey@@QEAA@XZ) referenced in function "private: __cdecl FReply::FReply(void)" (??0FReply@@AEAA@XZ)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	2	error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl FKey::~FKey(void)" (__imp_??1FKey@@QEAA@XZ) referenced in function "public: __cdecl FReply::~FReply(void)" (??1FReply@@QEAA@XZ)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	3	error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl FKey::FKey(struct FKey const &)" (__imp_??0FKey@@QEAA@AEBU0@@Z) referenced in function "public: __cdecl FReply::FReply(class FReply const &)" (??0FReply@@QEAA@AEBV0@@Z)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	4	error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct FKey & __cdecl FKey::operator=(struct FKey const &)" (__imp_??4FKey@@QEAAAEAU0@AEBU0@@Z) referenced in function "public: class FReply & __cdecl FReply::operator=(class FReply const &)" (??4FReply@@QEAAAEAV0@AEBV0@@Z)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	5	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::LeftMouseButton" (__imp_?LeftMouseButton@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	6	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::RightMouseButton" (__imp_?RightMouseButton@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	7	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Enter" (__imp_?Enter@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	8	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Escape" (__imp_?Escape@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	9	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::SpaceBar" (__imp_?SpaceBar@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	10	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::PageUp" (__imp_?PageUp@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	11	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::PageDown" (__imp_?PageDown@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	12	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::End" (__imp_?End@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	13	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Home" (__imp_?Home@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	14	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Left" (__imp_?Left@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	15	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Up" (__imp_?Up@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	16	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Right" (__imp_?Right@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	17	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::Down" (__imp_?Down@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	18	error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct FKey const EKeys::A" (__imp_?A@EKeys@@2UFKey@@B)	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\SearchBoxWidget.cpp.obj	MyProject2
Error	19	error LNK1120: 18 unresolved externals	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Binaries\Win64\UE4Editor-MyProject2.dll	MyProject2
Error	20	error : Failed to produce item: C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Binaries\Win64\UE4Editor-MyProject2.dll	C:\Users\Matthew\Documents\Unreal Projects\MyProject2\Intermediate\ProjectFiles\ERROR	MyProject2
Error	21	error MSB3073: The command ""C:\Program Files\Unreal Engine\4.0\Engine\Build\BatchFiles\Build.bat" MyProject2Editor Win64 Development "C:\Users\Matthew\Documents\Unreal Projects\MyProject2\MyProject2.uproject" -rocket" exited with code -1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets	38	5	MyProject2

Hi Ineni,

Check to see if “InputCore” is in your PrivateDependencyModuleNames in the Build.cs file for the project.

Cheers,
Nick (Epic Games)

1 Like

Awesome, thanks Rama!

Thanks for that Nick, out of interest, is there a change log somewhere I could look at?

Not really - but keep the questions coming. I’ll try and help where possible. Soon this should much less of an issue because github will mirror all of the individual perforce checkins so you’ll see comments and such :smiley:

Works for me. Thanks!