• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

SimConnect.lib file

Messages
20
Country
france
Hello,

Still developing my C++ add-on and It is working fine with P3D. I would like to make it compatible with FSX also but I get an exception from SimConnect (version mismatch) when connecting with FSX.

I compile my program linking with the SimConnect.lib file provided with P3D 1.4 SDK (I listened it was the same version as FSX Deluxe SimConnect). It is working fine with P3D 2.5, probably because it is back-compatible with older versions of SimConnect. However, it doesn't work with FSX. I tried to link with the SimConnect.lib file provided with FSX Deluxe SDK, but it doesn't work also (many compilation errors).

Could somebody explain me why it doesn't work ? Is it necessary to explicitly load the SimConnect.dll file needed for FSX ? Or what am I doing wrong with SimConnect.lib file ? Can I work with .lib or must I work with .dll for each version of SimConnect my client will connect with ?

Thanks in advance. I confess I am lost regardless the many hours I spent on the internet trying to understand how .dll and .lib works.
Cheers,
 
Messages
1,243
Country
canada
I think the FSX SDK is closer to VS2005/2008 so the platform 8.00 or 9.00 I believe. What version of VS do you have, if VS 2010 then you may need to change the platform to V90.

I compile my program linking with the SimConnect.lib file provided with P3D 1.4 SDK (I listened it was the same version as FSX Deluxe SimConnect).

Sounds like that is correct. Do know why did not work.
 
Messages
757
Country
netherlands
Not sure if you need to do anything with the platform. Anyway I use FSX SP2 lib and headers and they work well throgh the range up to 3.0
 
Messages
20
Country
france
Thank you for your help. Actually I write and compile within VS2012 express. I had to install VS2010 and select 2010 "Platform" within project proprieties to make it working.

Do you confirm that if I use SimConnect library version 61259 from FSX Deluxe SDK (and P3D 1.4 SDK ?) to compile my add-on, it will be compatible with FSX SP2, FSX SE and all P3D versions ?

Still do not understand what I am doing wrong. One more question. I have several P3D SDK's installed one my development PC. I explicitly write all the access path to P3D 1.4 .lib file within VS linker, but do you think it could be the problem ?

Thanks again, best regards,
 
Messages
20
Country
france
Hello,

Still investigating. I found several SimConnect dll's installed on my FS machine (winsxs folder). Should I delete everything and only let 61259 ?

Edit : Found 61259 folder containing 61637 file. Looks like normal according with some comments found on the internet... Removed all the other folders but still not working. I will try to remove all P3D SDK's on my development machine, and re-install a fresh FSX X-PACK SDK.

Regards,
 
Last edited:
Messages
757
Country
netherlands
You don't need to do anything with the DLLs.

With the .lib, you have to make sure you link to the correct file.
Same with .h

I don't know what else is there. Maybe the platform version is important after all.
 
Messages
20
Country
france
Hello,

Thanks a lot for your help. I made a fresh re-install of FSX:Acceleration SDK (version 61637) on my development machine, linked to the related .lib and .h and everything is working fine now, both with FSX:Acceleration and P3D 2.5. I still compile with VS2012 express with VS2010 as platform toolset. Looks like the .lib providen with P3D 1.4.4747 SDK is not compatible with FSX.

Can you just confirm that linking my code with the .lib providen with FSX:Acceleration SDK (version 61637) will give it a compatibility from FSX:Acceleration all the way to P3D v.3 (including FSX:SE) ?

Best regards,
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Just to make it clear, do NOT remove any of the SimConnect .dll files. They are in the SxS (Side-by-Side) folder for just that reason... :teacher:
 
Messages
1,243
Country
canada
Per the SDK page on the Prepar3d web site

The Prepar3D® SDK is available as a free download to anyone looking to get into developing add-ons or content for Prepar3D®.

The Prepar3D SDK 1.4.4747.0 (Prepar3D SDK Release 1.4) is directly compatible with Prepar3D 1.4.4747.0 (Prepar3D Release 1.4). The SimConnect.lib and LockheedMartin.Prepar3D.SimConnect.dll provided in the SDK can not be used to connect to FSX, ESP or any previous release of Prepar3D.

The SimConnect server in the Prepar3D application is backwards compatible with the SimConnect.dll’s of FSX and ESP and the ESP SimConnect server is backwards compatible with the SimConnect.dll’s of FSX. This means that if you are trying to develop an add on that will work with FSX, ESP, and Prepar3D, you will need to use a version of the SimConnect SDK that works with FSX.
 
Messages
757
Country
netherlands
Ah yes, I'd probably better acknowledge... if you link and compile for SimConnect.dll version from FSX SP2, you need to make sure users have that DLL version installed on their system, in the Side-by-Side system. Installer should be available in the SDK or probably downloadable from the internet.
 
Messages
1,243
Country
canada
The readme stuff for the FSX simconnect may help.

For Native code C++ you link to the simconnect.lib for the lowest common denominator that your client app will work with in this case FSX. Then the client app will work will all other sims. Your app also need simconnect.h for the same version of the simmconnect.lib.

Per the readme in the FSX SDK

SimConnect.lib - this is the import library that you link with your code. It resolves the references to the SimConnect_* functions, causing your SimConnect client .exe to load-time dynamically link to the SimConnect client DLL. You can also use the LoadLibrary and GetProcAddress OS Win32 functions to access the SimConnect_* functions, if you prefer.

I created a solution and has two versions (FSX and P3D) of the same program, with the linking part as separate projects within the solution. The code is common, but the linking is different.

Now this is a part below I did not need to do, but may help with all the versions now.
Again per the readme.

Sample.exe.manifest - a sample manifest file. Place a copy of this in the same directory as a SimConnect client .exe and change that copy's name to the same name as the client .exe with ".manifest" appended to it. When the client is launched, the Windows OS side-by-side (SxS) assembly system will find the designated version of the SimConnect.dll to load into the client's process. You can use the manifest tool (mt.exe) that is provided in the Platform SDK to embed the manifest contents into the client .exe, eliminating the need to keep a copy of the .manifest file present with the .exe. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/mt_exe.asp for more details about the manifest tool. The use of SxS manifests avoids the management problems of having multiple copies of a shared DLL.

For managed code you link to a managed dll and that managed dll works with the sims simconnect code. FSX has Microsoft.FlightSimulator.SimConnect.dll and P3D has LockheedMartin.Prepar3D.SimConnect.dll for v1 v2 and v3

Tim's (Beatles) managed wrapper is another way.
 
Messages
20
Country
france
Ah yes, I'd probably better acknowledge... if you link and compile for SimConnect.dll version from FSX SP2, you need to make sure users have that DLL version installed on their system, in the Side-by-Side system. Installer should be available in the SDK or probably downloadable from the internet.

The installer in the :Acceleration SDK installs v.61637 on the client machine. But my program (built with 61637 .lib and .h) seems to work with 61259. I checked the content of the 61259 folder in the winsxs folder and it contains 61637 .dll

Does somebody know why ?

Best regards,
 

mgh

Messages
1,413
Country
unitedkingdom
That's because the winSxS folder x86_microsoft.flightsimulator.simconnect_67c7c14424d61b5b_10.0.61259.0_none_55f5ecdc14f60568

contains SimConnect.dll which is version 10.0.61637.0.

That's the way winsxs works.
 
Messages
20
Country
france
That's because the winSxS folder x86_microsoft.flightsimulator.simconnect_67c7c14424d61b5b_10.0.61259.0_none_55f5ecdc14f60568

contains SimConnect.dll which is version 10.0.61637.0.

That's the way winsxs works.

So I need to ask the user to install 61637 on the client ?
 
Top