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

Messages
961
Has anyone else had difficulty in getting the sample SimConnect files within the SDK to compile?

We are using Visual Studio 2005 Express and are getting tons of errors like the following:

simconnect.h(30) : error C2146: syntax error : missing ';' before identifier 'SIMCONNECT_OBJECT_ID'
simconnect.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
simconnect.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
simconnect.h(301) : error C2065: 'MAX_PATH' : undeclared identifier

Any ideas would be most appreciated!

Thanks!
 
Now I'm getting these errors:

1>SimConnect.lib(1) : error C2059: syntax error : '<'
1>SimConnect.lib(2) : error C2018: unknown character '0x60'
1>SimConnect.lib(3) : error C2470: 'B' : looks like a function definition, but there is no parameter list; skipping apparent body
1>SimConnect.lib(3) : error C3872: '0x24': this character is not allowed in an identifier
1>SimConnect.lib(3) : error C3872: '0x24': this character is not allowed in an identifier
1>SimConnect.lib(3) : error C2059: syntax error : '<'
1>SimConnect.lib(3) : error C2059: syntax error : ';'
1>SimConnect.lib(3) : error C2630: ';' found in what should be a comma-separated list
1>SimConnect.lib(3) : error C2059: syntax error : ';'
1>SimConnect.lib(3) : error C2630: ';' found in what should be a comma-separated list
1>SimConnect.lib(3) : error C2059: syntax error : ';'
1>SimConnect.lib(3) : error C2630: ';' found in what should be a comma-separated list
1>SimConnect.lib(3) : error C2018: unknown character '0x1c'
1>SimConnect.lib(3) : error C2018: unknown character '0x1c'
1>SimConnect.lib(3) : error C2061: syntax error : identifier 'S'
1>SimConnect.lib(3) : fatal error C1004: unexpected end-of-file found

I have no idea why a lib file supplied by MS would have errors in it!

The only thing I can think of is that I am doing something wrong.

Thanks for any help or ideas.
 
Well we seem to have fixed the problem. And like most problems it came down to something quite simple, which we overlooked: not having a reference to a directory correct!
 
Visual C++ 2005, SimConnect

I'm having a similar problem. I link the library and include the SimConnect.h file in my SimConnect.cpp file. Try to compile and get:

Unexpected end of file, error executing c1.exe

Does anyone have any thoughts on this?

Thanks
 
Have you added the lib directory and inc directory for the simconnect dll and lib to your projects.

Right click on your project - select properties.

C++ - General - add in the inc directory from the SDK

Linker - General - add in the lib direcotry of the SDK

Also do what it says in the SDK set-up and add in simmconnect.lib to the Linker - command line Additional options.

The samples do work.
 
And, C++ errors are notoriously incorrect and have had many on a wild trip finding the proverbial missing bracket, semi-colon, or for that matter, the extra semi-colon, and may the force be with you if this happens inside a #define...
 
Last edited:
Back
Top