Jump to content
Sign in to follow this  
Guest Fabio Miguez

FS2K2Gauges.h problems

Recommended Posts

Guest Fabio Miguez

Hello all (and Arne in special),For the past few days I have been trying to get GDI+ to work with FS. I am making progress, albeit very slowly.I have now stumbled accross the following issue:When compiling the gauge in MSVisualStudio (C++, because of the GDI+), I have #included Arne's version of the gauges.h, calles FS2K2Gauges.h, and also added it to the Header Files folder of the IDE. But I get the following errors, in reference to the GAUGE_TABLE_BEGIN and GAUGE_TABLE_END definitions in the FS2K2Gauges.h:

[font color="black" size="3"]error C2601: 'module_init' : local function definitions are illegalerror C2601: 'module_deinit' : local function definitions are illegalerror C2601: 'DllMain' : local function definitions are illegalerror C2598: linkage specification must be at global scopeerror C2601: 'get_listelement_pointer' : local function definitions are illegalerror C2598: linkage specification must be at global scopeerror C2601: 'add_imagedata_to_listelement' : local function definitions are illegalerror C2598: linkage specification must be at global scopeerror C2601: 'remove_imagedata_from_listelement' : local function definitions are illegal[/font]

And finally

[font color="black" size="3"]fatal error C1004: unexpected end of file found[/font]

I have never encountered these errors before, but then again I used to compile in C. Can anybody help me here?

Share this post


Link to post
Share on other sites
Guest bartels

Strange stuff, I never had problmes like that with .cpp gauges, any way, try to insert: EXTERN_C void FSAPI module_init(void); EXTERN_C void FSAPI module_deinit(void); EXTERN_C BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved); EXTERN_C PELEMENT_HEADER FSAPI get_listelement_pointer(PELEMENT_HEADER pelement,UINT32 pos_element); EXTERN_C void FSAPI add_imagedata_to_listelement(PELEMENT_HEADER pelement,UINT32 pos_element,FLAGS image_flags); EXTERN_C void FSAPI remove_imagedata_from_listelement(PELEMENT_HEADER pelement,UINT32 pos_element,FLAGS image_flags); between #define GAUGE_TABLE_BEGIN() and void FSAPI module_init(void){} an alternative position could be just before the GAUGE_TABLE_BEGIN() macro, where the other EXTERN_Cs, "Linkage" and "ImportTable", are already declared.Let me know if that helped, if not mail me the files.Arne BartelsP.S. don't let you fool by the wordwrapping of the forum each line ends with ""

Share this post


Link to post
Share on other sites
Guest Fabio Miguez

Hey Arne.Tried the above, and apparently it worked, but now I am getting some more weird errors. I have e-mailed you.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...