Orbitersdk.h

MeDiCS

Donator
Donator
Joined
Sep 22, 2008
Messages
602
Reaction score
2
Points
0
I was curious to see how the "famous" Orbiter API worked, so I downloaded the SDK, wrote a simple DLL (only DLLMain and InitModule) and compiled it. But I get various errors from the SDK's include files:

||=== Test, Debug ===|
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
D:\Test\OrbiterAPI.h|109|error: ISO C++ prohibits anonymous structs|
D:\Test\OrbiterAPI.h|114|error: ISO C++ prohibits anonymous structs|
D:\Test\OrbiterAPI.h|119|error: ISO C++ prohibits anonymous structs|
D:\Test\OrbiterAPI.h|471|error: comma at end of enumerator list|
D:\Test\OrbiterAPI.h|1471|warning: no newline at end of file|
D:\Test\CelBodyAPI.h|56|warning: multi-line comment|
D:\Test\CelBodyAPI.h|77|warning: no newline at end of file|
D:\Test\VesselAPI.h||In member function `bool AnimState::Move(double)':|
D:\Test\VesselAPI.h|437|error: `max' was not declared in this scope|
D:\Test\VesselAPI.h|437|warning: unused variable 'max'|
D:\Test\VesselAPI.h|439|error: `min' was not declared in this scope|
D:\Test\VesselAPI.h|439|warning: unused variable 'min'|
D:\Test\Orbitersdk.h|17|warning: no newline at end of file|
||=== Build finished: 6 errors, 7 warnings ===|

As you can see, I'm using the latest MinGW on C++ mode. Have anyone experienced this?
 
MinGW... as in... Minimalist GNU for Windows?

I seriously doubt that thing has the C++ ISO defined files.



SDK includes some *other* files that come from the C/C++ standard. You need to have those.
Those files usually come with compilers such as Microsoft Visual C++ series, but you can freely download them off the net.
 
Orbiters SDK is not made for MinGW, it is based on Visual C++...other compilers usually don't like it without adaption.
 
Yes, Minimalist GNU for Windows, and as far as I know it does have C/C++ ISO defined files. I'm gonna check.

EDIT:
Thanks.

(Posted before seeing Urwumpe post)
 
Yes, Minimalist GNU for Windows, and as far as I know it does have C/C++ ISO defined files. I'm gonna check.

ISO defined is another thing, you should quickly erase from your dictionary. The OSI standard of C++ says what minimal should be allowed, but it does for example not disallow anonymous structs... they are just considered historic ballast now.
 
ISO defined is another thing, you should quickly erase from your dictionary. The OSI standard of C++ says what minimal should be allowed, but it does for example not disallow anonymous structs... they are just considered historic ballast now.


Yea, that's true. I just picked it up when I first started learning C++ and can't get rid of it now =/
 
Thanks everyone for the replyes :speakcool:

EDIT:
Microsoft is so :censored: capitalist. REQUIRING A FREE REGISTRATION just to send ads.
 
Thanks everyone for the replyes :speakcool:

EDIT:
Microsoft is so :censored: capitalist. REQUIRING A FREE REGISTRATION just to send ads.

What do you mean? In order to get the Visual Studio software?

And send ads how?
 
There is a way to compile it with GCC?
 
There is a way to compile it with GCC?
Most likely not.
The lib files are not recognized well by GCC tools, and there were some other problems i ran into when tried it, about runtime and linking incompatibilities. Linking the the main issue here.
It may have changed by now tho.
 
Hi there!

It would be nice to have some sort of aggregated list of compilers that could be used instead of VC++ specifically for Orbiter, with info on what kind of modifications could be needed to actually make those things work. Has anybody tried to actually do that?
 
Hi there!

It would be nice to have some sort of aggregated list of compilers that could be used instead of VC++ specifically for Orbiter, with info on what kind of modifications could be needed to actually make those things work. Has anybody tried to actually do that?

Or you could just use VC++, which works and works well...
 
Hi there!

It would be nice to have some sort of aggregated list of compilers that could be used instead of VC++ specifically for Orbiter, with info on what kind of modifications could be needed to actually make those things work. Has anybody tried to actually do that?


If your so anti VC++, then use http://www.crimsoneditor.com/

:cheers:
 
Oh! No! I am not essentially against VC++; it is simply a matter of not being limited to just one sort of tool. I have built recently a simpit for a Beech B350 and ran into some trouble using VB to control Phidgets in there, but got around in that way. Plus, my newly installed BC++ EE has told me the prverbial thing about windows.h not being there despite the fact that it is; have checked that.
 
Oh! No! I am not essentially against VC++; it is simply a matter of not being limited to just one sort of tool.
Unless you can find a compiler that uses the same name mangling scheme as Visual C++, then you won't be able to use the API. Orbiter exports the API functions with VC++ name mangling and expects to find your API derived classes exported from your DLL with VC++ name mangling.
 
Back
Top