• 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.

C <-> xml variables

DragonflightDesign

Resource contributor
Messages
1,390
Country
northernireland
I need to set up communication between the 2D and VC panels, so I'm following this page in the Wiki:

http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges

However, VS2015 throws a series of errors at me:-

Code:
Error   C2146   syntax error : missing ';' before identifier 'pitot_cover_id'  testProject  myProject\project_vars.h   166 
Error   C4430   missing type specifier - int assumed. Note: C++ does not support default-int  testProject  myProject\project_vars.h   166 
Error   C2378   'ID' : redefinition; symbol cannot be overloaded with a typedef   testProject   d:\flight simulator development\dragonflight design\fsxgauges_sp2.h   2955

and many more. The not-shown remaining errors are all in fsxgauges_sp2.h and all, for some reason, point to either a struct or a union. What did I miss?
 
Uh... it doesn't know what ID is... which means you're redefined ID somehow... do you have the gauges.h file being included more than once in the project?
 
No, it's only imported once, Ed. Imports are always listed in one file and one file only; I don't allow nested/child imports because of the problems that always causes. I don't recall using ID as a definition for something, but it has to be worth checking for. Thanks!
 
Got it - sneaky, sneaky. Caught out by my own insistence of calling all header files in the same place; ID pitot_cover_id was undefined because the header file it was in gets called before the gauges.h file. :oops: Thanks again for the hint.
 
Last edited:
Back
Top