Discussion Building OpenOrbiter under Linux

JDat

Active member
Joined
Sep 6, 2010
Messages
105
Reaction score
74
Points
43
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?
 

yitianetie

Member
Joined
Mar 24, 2020
Messages
50
Reaction score
18
Points
23
Location
Brittany
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.
 

DarkWanderer

Active member
Orbiter Contributor
Donator
Joined
Apr 27, 2008
Messages
213
Reaction score
83
Points
43
Location
Moscow
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

  • CMakeSettings.zip
    829 bytes · Views: 4

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,272
Reaction score
3,244
Points
203
Location
Toulouse
I like people that like challenges :cheers:
 

JDat

Active member
Joined
Sep 6, 2010
Messages
105
Reaction score
74
Points
43
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.
 

DarkWanderer

Active member
Orbiter Contributor
Donator
Joined
Apr 27, 2008
Messages
213
Reaction score
83
Points
43
Location
Moscow
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
 

RobW

New member
Joined
Aug 3, 2019
Messages
3
Reaction score
0
Points
1
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.
 
Top