question

Martin avatar image
Martin asked

unresolved externals when linking to party SDK (missing .lib file?)

Hi

I'm having an issue setting up the party SDK. This is my code, it is pretty much the same as the code referenced in the documentation:

	bool m_partyInitialized = false;
	auto& partyManager = Party::PartyManager::GetSingleton();
	PartyError err;
	//Only initialize the party manager once.
	if (m_partyInitialized == false)
	{
		// Initialize PlayFab Party
		err = partyManager.Initialize("Test");
		if (PARTY_FAILED(err))
		{
			return -1;
		}
		m_partyInitialized = true;
	}
	return 0;
I have set up the nuget package using the package manager, and it is installed the the project correctly. However, when I try to compile I get this error:
1>PartyTest.obj : error LNK2019: unresolved external symbol "public: static class Party::PartyManager & __cdecl Party::PartyManager::GetSingleton(void)" (?GetSingleton@PartyManager@Party@@SAAEAV12@XZ) referenced in function main
1>PartyTest.obj : error LNK2019: unresolved external symbol "public: unsigned int __cdecl Party::PartyManager::Initialize(char const *)" (?Initialize@PartyManager@Party@@QEAAIPEBD@Z) referenced in function main
1>C:\Users\user1\source\repos\Project1\x64\Debug\Project1.exe : fatal error LNK1120: 2 unresolved externals

After looking through the package, it looks as if there is no .lib file in there, and I think that is required for us to link to the .dll? Is there a way around this, or is there a way to compile without it?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Martin avatar image
Martin answered

Looks like I didn't include the PartyImpl.h header file, I think this will work now with that

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.