Library Linking

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
patrickballhaus
Posts: 2
Joined: Wed Mar 20, 2024 12:57 pm

Library Linking

Post by patrickballhaus »

Hello,

I am currently writing a code to connect an add-on to the Simulator using the SDK. I previously used MSFS to connect to this code and it was working. For work reasons we decided to switch to Prepar3D but when trying to adapt the code I started running into problems when linking the SimConnect.lib. I have tried to match the linking as shown in the samples, but it is not working.
I was hoping someone might be able to help me solve this. This is the current setup in VS:

- VC++ directories -> Include directories: C:\Users\Patrick Ballhaus\Documents\Prepar3D_test\inc\SimConnect\;$(IncludePath)
-> Library directories: C:\Users\Patrick Ballhaus\Documents\Prepar3D_test\lib\;$(LibraryPath)
- Linker -> Input -> additional dependencies: SimConnect.lib

I have ensured that the corresponding files are located in the path given.

Thanks in advance.

Best regards,
Patrick
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: Library Linking

Post by Clifton Crane »

Hi Patrick,

Could you post the errors you are seeing?

We ship both a Debug and Release version of the SimConnect.lib. Perhaps double-check the correct one is being linked to your VS Debug/Release configurations.

Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
patrickballhaus
Posts: 2
Joined: Wed Mar 20, 2024 12:57 pm

Re: Library Linking

Post by patrickballhaus »

Hello Clifton,

This is the error code:

Error LNK1104 cannot open file 'SimConnect.lib' Prepar3D_test C:\Users\Patrick Ballhaus\Documents\Prepar3D_test\Prepar3D_test\LINK

Inside the folder in this project I have both the debug and normal library.

Regards,

Patrick Ballhaus
Post Reply