std::pair<FString, ...> unrecognized external symbol

Hi again guys,

I’m trying to use this idea, and it works fine. Problem is when I try to access a member I get an error.



const std::pair<FString, uint32> ABC = std::make_pair(FString("ABC"), 30);

(...)

const std::pair<FString, uint32>* C::ValueOf(FString* identifier)
{
   FString a = ABC.first; //error

   //The idea is to compare identifier.ToUpper() == ABC.first.ToUpper()
}


And the error is:



Severity	Code	Description	Project	File	Line
Error	LNK2001	unresolved external symbol "public: static struct std::pair<class FString,unsigned int> const C::ABC" (?ABC@StatFunction@@2U?$pair@VFString@@I@std@@B)	SurvivalGame	D:\Unreal Projects\SurvivalGame\Intermediate\ProjectFiles\Module.SurvivalGame.cpp.obj	1



Any help?

If I’m not mistaken, you have to add the class specificator when initializing the variable:



const std::pair<FString, uint32> C::ABC = std::make_pair(FString("ABC"), 30);