Sign in to follow this  
kiek

Simconnect and Dev-C++ problem

Recommended Posts

Hi,Has anybody managed to get it to work with Dev-C++?I try to build the Open and Close example, it compiles OK, but the Linker complains with the following messages:undefined refrence to 'SimConnect_Open@24'undefined refrence to 'SimConnect_Close@4'while I have put SimConnect.lib in the project directory and have add it to the Linker command...?I thought it might be the COFF vs OMF problem, and tried the Borland version of the library, but that was no solution.Nicohttp://www.nicokaan.nl

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>I try to build the Open and Close example, it compiles OK, but>the Linker complains with the following messages:>>undefined refrence to 'SimConnect_Open@24'>undefined refrence to 'SimConnect_Close@4'>>while I have put SimConnect.lib in the project directory and>have add it to the Linker command...Aren't they references to C++ procedures? I think you need to tell the compiler/linker that they are C, not C++. That should have been accomplished by the SIMCONNECTAPI declaration in front of each declaration in SimConnect.h.You will see that SIMCONNECTAPI is defined just before the declarations as:#if !defined(SIMCONNECTAPI)#define SIMCONNECTAPI extern "C" HRESULT __stdcall#endifMaybe your compiler doesn't understand "C"?RegardsPete

Share this post


Link to post
Share on other sites

Hi Pete,Thanks for your help.Yes my compiler understands C.... its'a C/C++ compiler.I have linked C functions to a C++ program before, actually that 's what I'm also doing with my FSCONV program (in C++) using FSUIPC.Any other ideas?Nicohttp://www.nicokaan.nl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this