Page 1 of 1

Unresolved external symbol when including SimConnect.h

Posted: Mon May 13, 2019 11:15 am
by uPrizZ
Hello guys,

I tried to create a C++ project which includes SimConnect.h, but so far I had no luck. I am using QtCreator with Qt5.6 and the MSVC2013 32bit compiler! Also, I am using SDK v3, not v4!

First I had like 7 unresolved externals, but then noticed that SimConnect requires user32.lib, AdvApi32.lib and Shell32.lib, so I found out that a way to include these is to add pragmas like so:

Code: Select all

#pragma comment (lib, "user32.lib") #pragma comment (lib, "AdvApi32.lib") #pragma comment (lib, "Shell32.lib")
I did that and indeed most of my unresolved external errors are gone, but one still remains. I cannot figure out how to solve it:
SimConnect.lib(commClient.obj):-1: Fehler: LNK2019: unresolved external symbol __imp__CoTaskMemFree@4 referenced in function "void __stdcall readConfig(unsigned long,int &,char *,char *,unsigned int &,bool &)" (?readConfig@@YGXKAAHPAD1AAIAA_N@Z)
Is there any other library which I need to include?

Re: Unresolved external symbol when including SimConnect.h

Posted: Mon May 13, 2019 12:47 pm
by JB3DG
Most of the usual default windows libraries are needed.

Re: Unresolved external symbol when including SimConnect.h

Posted: Tue May 14, 2019 10:01 pm
by uPrizZ
sorry if this is a stupid question, but a quick google research didn't give me sufficient results...

is there a list of those windows libraries?

EDIT: found a list here.

The one library missing was OLE32.lib. Maybe that should be added to the wiki, because here it only states the three libraries which I mentioned in my first post. One is missing