Unresolved external symbol when including SimConnect.h

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Post Reply
uPrizZ
Posts: 2
Joined: Mon May 13, 2019 10:51 am

Unresolved external symbol when including SimConnect.h

Post 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?
JB3DG
Posts: 609
Joined: Mon Jan 09, 2012 6:44 pm

Re: Unresolved external symbol when including SimConnect.h

Post by JB3DG »

Most of the usual default windows libraries are needed.
Jonathan Bleeker
Milviz systems dev

Formerly known as Naruto-kun
uPrizZ
Posts: 2
Joined: Mon May 13, 2019 10:51 am

Re: Unresolved external symbol when including SimConnect.h

Post 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
Post Reply