Matias Saibene
Terrible developer (seriously)
Hello friends of the forum. As I mentioned recently, I am taking my first small steps in programming add-ons for Orbiter.
On Linux I haven't had any problems, but when I try to compile on Windows I get errors on the header files in the Orbiter 2016 include folder.
It's very puzzling because I expected a barrage of bugs in my code, but according to the CodeBlocks log the bugs are in the Orbiter headers.
Unfortunately due to my internet speed I don't have access to Visual Studio Community, but I managed to correctly configure CodeBlocks to search and include Orbiter header files (Orbitersdk\includes) and libraries (Orbitersdk\lib).
Here is my build log:
Feel free to correct me if I'm wrong or if I don't know something. Maybe I was too hasty because I thought it would be just as easy as on Linux.
On Linux I haven't had any problems, but when I try to compile on Windows I get errors on the header files in the Orbiter 2016 include folder.
It's very puzzling because I expected a barrage of bugs in my code, but according to the CodeBlocks log the bugs are in the Orbiter headers.
Unfortunately due to my internet speed I don't have access to Visual Studio Community, but I managed to correctly configure CodeBlocks to search and include Orbiter header files (Orbitersdk\includes) and libraries (Orbitersdk\lib).
Here is my build log:
C++:
||=== Build: Release in Luna3_module (compiler: GNU GCC Compiler) ===|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\OrbiterAPI.h|44|warning: ignoring #pragma warning [-Wunknown-pragmas]|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\OrbiterAPI.h||In function 'VECTOR3 POINTERTOREF(VECTOR3*)':|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\OrbiterAPI.h|7215|warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\OrbiterAPI.h||In function 'char* ModuleDate()':|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\OrbiterAPI.h|7227|warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\CelBodyAPI.h|441|error: 'ATMOSPHERE' does not name a type|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\CelBodyAPI.h|486|error: 'ATMOSPHERE' has not been declared|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\CelBodyAPI.h|523|error: 'ATMOSPHERE' does not name a type|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\VesselAPI.h||In member function 'bool AnimState::Move(double)':|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\VesselAPI.h|6369|error: 'max' was not declared in this scope|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\VesselAPI.h|6369|note: suggested alternative:|
C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\stl_algobase.h|265|note: 'std::max'|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\VesselAPI.h|6371|error: 'min' was not declared in this scope|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\VesselAPI.h|6371|note: suggested alternative:|
C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\stl_algobase.h|243|note: 'std::min'|
C:\Users\Matías Saibene\Saved Games\Orbiter2016\Orbitersdk\include\MFDAPI.h|265|error: 'Instrument_User' does not name a type|
C:\Users\Matías Saibene\Desktop\Luna3_orbiter_addon-master\Luna3_CBP\Luna3_module\Luna3.h|47|error: 'int Luna3::clbkConsumeBufferedKey(int, bool, char*)' marked 'override', but does not override|
C:\Users\Matías Saibene\Desktop\Luna3_orbiter_addon-master\Luna3_CBP\Luna3_module\Luna3.cpp||In member function 'virtual void Luna3::clbkSaveState(FILEHANDLE)':|
C:\Users\Matías Saibene\Desktop\Luna3_orbiter_addon-master\Luna3_CBP\Luna3_module\Luna3.cpp|189|warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]|
C:\Users\Matías Saibene\Desktop\Luna3_orbiter_addon-master\Luna3_CBP\Luna3_module\Luna3.cpp||In function 'void ovcExit(VESSEL*)':|
C:\Users\Matías Saibene\Desktop\Luna3_orbiter_addon-master\Luna3_CBP\Luna3_module\Luna3.cpp|247|warning: deleting object of polymorphic class type 'Luna3' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]|
||=== Build failed: 7 error(s), 5 warning(s) (0 minute(s), 3 second(s)) ===|
Feel free to correct me if I'm wrong or if I don't know something. Maybe I was too hasty because I thought it would be just as easy as on Linux.