Discussion Building OpenOrbiter under Linux

JDat

Well-known member
Joined
Sep 6, 2010
Messages
154
Reaction score
126
Points
58
16.11.2 works for me without issues for me, I've even managed to start compiling Orbiter under Linux (failing now, obviously)

Wow! Tell me more about compiling under linux. I am using linux daily and are really interesting into compiling under linux. How and what you are doing to compile under linux? Some tricks with <windows.h> and wine library?
 
Interresting. I also would like to compile Orbiter under Linux. Nevertheless, we don't have a native graphic client available for Orbiter 2016 on Linux. I know there is OGLA client which uses OpenGL but it has not been updated for using with last Orbiter version.
 
I don't have anything advanced just yet - just the fact of compilation itself.

Yes, I've tried wineg++ and regular gcc. wineg++ is more promising but has a number of changes to be made for "Windows" and std headers to be compatible with each other
1630650377165.png

If you want to try it as well - attached is a CMakeSettings.json which allows to compile under Linux from VS. Prerquisites:
  • SSH connection set up in Visual Studio
  • wine-devel and gcc on the Linux host
 

Attachments

I like people that like challenges :cheers:
 
Is there any recipe how to compile Open Orbiter under linux without Visual Studio?
For example:
Code:
user@computer:~$ cd orbiter/build
user@computer:~$ cmake ..
user@computer:~$ make
user@computer:~$ sudo make install
or something similar.
 
Is there any recipe how to compile Open Orbiter under linux without Visual Studio?
For example:
Code:
user@computer:~$ cd orbiter/build
user@computer:~$ cmake ..
user@computer:~$ make
user@computer:~$ sudo make install
or something similar.
Checkout this branch: https://github.com/DarkWanderer/orbiter/tree/linux

Then:

Bash:
mkdir -p out/build
cd out/build
cmake -G Ninja ../.. -DCMAKE_CXX_COMPILER=/usr/bin/wineg++
cmake --build . -- -k0

There's a ton of errors at the moment, of course, due to
  • non-POSIX functions being used in some places - e.g. _fseeki64, stricmp, _mkdir etc.
  • MFC headers used
  • CMakeLists still trying to make .chm files even though "MAKE_DOCS" flag is off
but the ball is rolling. Contributions are welcome
 
Good work getting that far with building on Linux!

Is there any reason we couldn't use the STL's std::filesystem and cstring libraries instead of relying on the Windows specific functions? We would have to compile with -std=c++17 to get std::filesystem, but I think it would be a good improvement.
 
Back
Top