I would like to try an example from the SimConnect SDK:
// SimConnect_Test.cpp : Defines the entry point for the console application.
//
//------------------------------------------------------------------------------
//
// SimConnect Open and Close Sample
//
// Description:
// Opens and immediately Closes SimConnect
//------------------------------------------------------------------------------
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <strsafe.h>
#include "SimConnect.h"
HANDLE hSimConnect = NULL;
void testOpenClose()
{
HRESULT hr;
if (SUCCEEDED(SimConnect_Open(&hSimConnect, "Open and Close", NULL, 0, 0, 0)))
{
printf("\nConnected to Flight Simulator!");
hr = SimConnect_Close(hSimConnect);
printf("\nDisconnected from Flight Simulator");
}
else
{
printf("\nFailed to connect to Flight Simulator");
}
}
int __cdecl _tmain(int argc, _TCHAR* argv[])
{
testOpenClose();
return 0;
}
But I get this error when I try to compile and build the code in Visual Studio Express 2013 (VSE 2013):
The pop-up error message:
Unable to start program 'C:\Users\Bruger\Documents\Visual Studio 2013\Projects\SimConnect_Test\Debug\SimConnect_Test.exe',
The mentioned file was not found.
And the Error List in VSE 2013:
error LNK1104: cannot open file 'F\Program.obj'
I Wonder what is the problem here?? Really hope someone can help!
Best regards
Lars
// SimConnect_Test.cpp : Defines the entry point for the console application.
//
//------------------------------------------------------------------------------
//
// SimConnect Open and Close Sample
//
// Description:
// Opens and immediately Closes SimConnect
//------------------------------------------------------------------------------
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <strsafe.h>
#include "SimConnect.h"
HANDLE hSimConnect = NULL;
void testOpenClose()
{
HRESULT hr;
if (SUCCEEDED(SimConnect_Open(&hSimConnect, "Open and Close", NULL, 0, 0, 0)))
{
printf("\nConnected to Flight Simulator!");
hr = SimConnect_Close(hSimConnect);
printf("\nDisconnected from Flight Simulator");
}
else
{
printf("\nFailed to connect to Flight Simulator");
}
}
int __cdecl _tmain(int argc, _TCHAR* argv[])
{
testOpenClose();
return 0;
}
But I get this error when I try to compile and build the code in Visual Studio Express 2013 (VSE 2013):
The pop-up error message:
Unable to start program 'C:\Users\Bruger\Documents\Visual Studio 2013\Projects\SimConnect_Test\Debug\SimConnect_Test.exe',
The mentioned file was not found.
And the Error List in VSE 2013:
error LNK1104: cannot open file 'F\Program.obj'
I Wonder what is the problem here?? Really hope someone can help!
Best regards
Lars





