- Messages
- 9
- Country

Hello everyone,
It has been more than a week that I am trying to create a simple project using C++ without any success.
I use Visual Studio 2015, I tried to create a Win32 project and a C++ universal application but both are giving me errors when I try to build. I am actually on the C++ win32 project, I've added the path to both the PMDG_NGX_SDK.h and SimConnect.h, I also added the path to the SimConnect.lib file, I've added it also in Linker > Command line. I'm using this simple test code :
But I get these errors :
What I am trying to do is just to create a simple application that can have a UI (that's why I tried the universal application) but days have passed and so far I got only erros.
Thanks for your help.
It has been more than a week that I am trying to create a simple project using C++ without any success.
I use Visual Studio 2015, I tried to create a Win32 project and a C++ universal application but both are giving me errors when I try to build. I am actually on the C++ win32 project, I've added the path to both the PMDG_NGX_SDK.h and SimConnect.h, I also added the path to the SimConnect.lib file, I've added it also in Linker > Command line. I'm using this simple test code :
PHP:
#include <windows.h>
#include "SimConnect.h"
#include "PMDG_NGX_SDK.h"
HANDLE hSimConnect = NULL;
void ChangeVehicle()
{
HRESULT hr;
if (SUCCEEDED(SimConnect_Open(&hSimConnect, "Change Vehicle", NULL, 0, 0, 0)))
{
// Sending the title of the vehicle
SimConnect_ChangeVehicle(hSimConnect, "Maule M7 260C paint2");
hr = SimConnect_Close(hSimConnect);
}
}
void main() {
ChangeVehicle();
}
But I get these errors :
Code:
Error LNK2019 unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) CockpitControl-win32 CockpitControl-win32\MSVCRTD.lib(exe_winmain.obj) 1
Error LNK2019 unresolved external symbol __imp__printf referenced in function "public: virtual void __thiscall CClient::Reset(void)" (?Reset@CClient@@UAEXXZ) CockpitControl-win32 CockpitControl-win32\SimConnect.lib(client.obj) 1
Error LNK2019 unresolved external symbol __imp___vsnprintf referenced in function "long __cdecl StringCbPrintfA(char *,unsigned int,char const *,...)" (?StringCbPrintfA@@YAJPADIPBDZZ) CockpitControl-win32 CockpitControl-win32\SimConnect.lib(commClient.obj) 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::_System_error_category::message(int)const " (?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z) CockpitControl-win32 CockpitControl-win32\SimConnect.lib(SimConnectClient.obj) 1
What I am trying to do is just to create a simple application that can have a UI (that's why I tried the universal application) but days have passed and so far I got only erros.
Thanks for your help.

