Board index FlightGear Development

Compiling FlightGear in Windows

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Compiling FlightGear in Windows

Postby Kikokou-san » Wed May 17, 2017 8:18 am

Hi everybody,

I'm using FG for several years now, mainly to play, but I recently decided to modify it, and experience those changes in FG.

I read ALL the wiki pages (very well done by the way), but I had troubles to really understand how to compile FG on Windows (am using Windows 10). There are some articles on the WIKI but they look a bit outdated and skip very fast some parts that I did not really understand.

I already suceeded to compile FG on Linux (Linux Mint Serena) with the download and compile script, but on Windows I don't even understand what I should do :
- I already checked out FlightGear and SimGear projects on Sourceforge so the sources are donwloaded on my computer
- I have a correct C++ compiler and am using NetBeans IDE
- But I don't know what I have to do with all dependencies (PLIB, OSG, etc.) and also did not understand if I have to compile simgear first and then flightgear, or if all the project can be compiled once : do I have to download also the sources for those 3rd party utilities or can it be downloaded already compiled with the latest release ?

As you might see, I am a bit lost... :| :|

Is there any tutorial somewhere that explains step by step what has to be done ?

Thank you very much for your help

Best regards,
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby erik » Wed May 17, 2017 9:38 am

Kikokou-san wrote in Wed May 17, 2017 8:18 am:- But I don't know what I have to do with all dependencies (PLIB, OSG, etc.) and also did not understand if I have to compile simgear first and then flightgear, or if all the project can be compiled once : do I have to download also the sources for those 3rd party utilities or can it be downloaded already compiled with the latest release ?

You need OSG and PLIB available before compiling SimGear. Both may be a DLL though but you need the development header files.
After that you can compile FlightGear.

I did never compile FlightGear on Windows but maybe you could find some helpful (project) files here:
http://build.flightgear.org:8080/job/Wi ... ightly/ws/

Erik
erik
 
Posts: 1503
Joined: Thu Nov 01, 2007 1:41 pm

Re: Compiling FlightGear in Windows

Postby Necolatis » Wed May 17, 2017 11:45 am

Kikokou-san wrote in Wed May 17, 2017 8:18 am:I have a correct C++ compiler and am using NetBeans IDE


In my experience unless you want a world of trouble, go with "VS Express For Desktop". I tried the the netbeans way too, is really a pain to get setup, and I did not succeed.

The only source you need is simgear and flightgear. The rest can be downloaded from Jenkins and various Internet sites.

The wiki page I recommend looking at is: http://wiki.flightgear.org/Building_usi ... _-_Windows

Most of the other pages for compiling on windows seem to be out of date. Well this is a bit too I think, but is probably the closest you can get.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1860
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 7:57 am

Dear Erick, Dear Necolatis,

Thank you very much for your answers. :D :D

I tried indeed with Netbeans and CMake, at the moment with no success.

I am trying right now with MSVC.

I will let you know if I encounter any problem.

Have a veyr nice day

Best regards
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 1:02 pm

So... Back I am... With not so good news..

I followed the procedure for SimGear and managed to build it after several attempts, and several modifications to variables in CMake.

For FlightGear however, it began the same (many errors to be corrected), but I'm blocked to solve the last one.

Code: Select all
CMake Error at C:/Users/mehdi/Desktop/OutilsCompilationFG/sim-built/simgear/SimGearConfig.cmake:25 (include):
  include could not find load file:

    C:/Users/mehdi/Desktop/OutilsCompilationFG/sim-built/simgear/SimGearTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:342 (find_package)


RTI: DISABLED
OpenMP: DISABLED
SSE/SSE2 support: ENABLED
For better linking performance, use OSG with fixed fstream header
Could NOT find GLEW (missing:  GLEW_INCLUDE_DIR GLEW_LIBRARY)
CMake Warning at utils/fgpanel/CMakeLists.txt:7 (message):
  FGPanel enabled, but some dependencies are missing


libPNG: TRUE
OpenGL: TRUE
GLEW: FALSE
Freetype: TRUE
Tests: ENABLED
Tests disabled on Windows for the moment
EventInput not implemented for Windows yet
Configuring incomplete, errors occurred!


I checked for SimGearTargets manually and there is no such a file in the folder...

Any idea ?

Also, any idea about what is Glew and if it should be in 3rd parties ?

Thank you very much for your help, I keep trying in the meantime...

Best regards,
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 1:14 pm

I found myself this topic viewtopic.php?f=45&t=31607

In which you, Necolatis, had the same problem than I have.

I will try to restart everything from scratch, recompile SimGear, and recompile FlightGear to see if something is changing.

Best regards
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Necolatis » Thu May 18, 2017 2:14 pm

This is what worked for me:


SIMGEAR


MSVC_3RDPARTY_ROOT
C:/fg-dev/MSVC_3RDPARTY_ROOT

CMAKE_INSTALL_PREFIX
C:/fg-dev/MSVC_3RDPARTY_ROOT/install/msvc140-64/SimGear

BOOST_ROOT
C:/fg-dev/MSVC_3RDPARTY_ROOT/Boost


FLIGHTGEAR
========

MSVC_3RDPARTY_ROOT
C:/fg-dev/MSVC_3RDPARTY_ROOT

CMAKE_INSTALL_PREFIX
C:/fg-dev/MSVC_3RDPARTY_ROOT/install/msvc140-64/SimGear

BOOST_ROOT
C:/fg-dev/MSVC_3RDPARTY_ROOT/Boost

SimGear_DIR
C:/fg-dev/MSVC_3RDPARTY_ROOT/install/msvc140-64/SimGear/lib/cmake/SimGear

GLEW_INCLUDE_DIR
C:/fg-dev/glew-2.0.0/include

GLEW_LIBRARY_RELEASE
C:/fg-dev/glew-2.0.0/lib/Release/x64/glew32.lib

Qt5_DIR
C:/fg-dev/qt/5.6/msvc2015_64/lib/cmake/Qt5

WITH_FGPANEL
check off
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1860
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 2:17 pm

I just finished trying to compile again SimGear and FlightGear twice..

SimGear is OK but I am still stuck with FlightGear with this missing C:/Users/mehdi/Desktop/OutilsCompilationFG/sim-built/simgear/SimGearTargets.cmake

As Necolatis previously, I found this file somewhere else, but it is not where CMAKE is looking for it..

I don't know what to do...

Any hint ?
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 2:21 pm

I just saw your reply Necolatis ! Thank you so much for your help..

I will try this right away.

I am a bit surprised that your CMAKE_INSTALL_PREFIX for
Code (): Select all
FlightGear
refers to C:/fg-dev/MSVC_3RDPARTY_ROOT/install/msvc140-64/
Code (): Select all
SimGear
because I thought it was the folder where the program was to be installed later on.

For GLEW and QT5, I can assume that you copied and pasted the files there ? What did you copy exactly ?

Thank you
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 3:00 pm

OK Necolatis ! It worked ! I could compile both SimGear and FlightGear...

Even if I have neiher GLEW nor QT5 (QT launcher disabled in CMAKE)

However, when I try to launch FlightGear by clicking fgfs.exe in C:\Users\mehdi\Desktop\EssaiCompilation\install\msvc140-64\SimGear\bin, I have an error message saying crashrpt1403.dll is not installed on my computer...

I've searched for this dll on the internet but there is not many information...
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Thu May 18, 2017 3:26 pm

Sorry, I am a bit talking alone; but I prefer to give what I find when I find it..

I tried to compare the folder C:\Program Files\FlightGear 2017.1.3\bin, which is the folder of my normal FG installation, with the bin folder of my own built, I can realise that in my own built, there are only .exe files (fgcom.exe, fgfs.exe, etc.). In the "normal" folder, there are the same .exe but also a bunch of DLLs that seams to be missing with my own built...

Has anyone an idea of why the DLLs are not built during the built process ?

Thank you

Best regards
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Necolatis » Thu May 18, 2017 4:42 pm

Just install a nightly (not full) from jenkins. Then you get those missing files.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1860
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Fri May 19, 2017 8:06 am

Dear Necolatis, Dear all,

I read the information on the Wiki regarding Jenkins server : http://wiki.flightgear.org/FlightGear_build_server

I then had a look at the files available for download here : http://build.flightgear.org:8080/ and first questions arose...

Firstly, I understood that the tabs can give access to the file depending on the OS (Windows, Max, Linux, etc..) or on the program (FlihgtGear, OSG, etc.).

I decided to go to "Windows" as this is my OS, and I could then download different folders : 3rdParties, Boost, FGCom, FGRun, FlightGear, SimGear, etc. and at the end, two different items : Windows-release and Windows-nightly.

I saw that Windows-release includes a .exe file, but I did not understood the real differences between the content of both folders.

Anyway, I decided to go inside Windows-nightly and download all files located at Install/MSVC140-64/bin.

I could recognise inside the .exe files that I had myself after my own built, plus some other files (dlls, folders, etc.).

I copied everything to the folder in which I had my own .exe files obtained from my own built, and unfortunately, the same error is displaying at execution of fgfs.exe. The CrashRpt1403.dll is missing.. After checking, I realised that it was NOT in the files I downloaded and copied, whereas it is indeed in the folder of C:/Programs/FlightGear obtained after a traditionnal installation.

Thank you very much in advance for any help that can be provided on this subject... I think I am close to it, but...
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Fri May 19, 2017 10:13 am

OK, just in case my experience can benefit others, I will explain how I finally succeeded to build FlightGear on Windows 10.

I followed Necolatis advices until now, and I finally decided to copy paste all files from C\Programmes\FlightGear\bin to the bin folder generated by my own built.

So all the .dll and other files copied, I only rejected copy for the .exe files in order to keep the .exe that I built.

I also had to copy paste the \data folder from C\Programmes\FlightGear\data to my own simgear folder in simgear\data.

After that, I finally succeded to launch FlightGear. Ok, my C172 was in the water, and impossible to do anything, but I will try to improve this.

At least, it worked even if it is not 100% conventional I guess...

Thank you all and Necolatis in particular for the help !
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Re: Compiling FlightGear in Windows

Postby Kikokou-san » Mon May 22, 2017 9:42 am

Hi everybody,

Sorry, I come back with my problems with compiling FG on Windows 10.

As I said, I succeeded to build FG (but with FGPanel deactivated and without Qt) once.

However, as no .dll files were created, I had to copy paste files from my regular install directory, to the one I built myself, but this is quite unstable.

Necolatis, you suggested to download the Windows-nightly, what I did, but I did not find any .dll files in it. Could you please be so kind to explain me what I should exactly do with the Windows-nightly ?

Also, when I activate Qt, I have the following error when launching fgfs.exe (translated from french) :

"fgfs.exe Entry point not found - ?SetSelectModel@QListWidget@@UEAAXPEAVQItemSelectionModel@@@Z is not found in the dynamic links library of MyCustomisedPath\fgfs.exe"

I tried to rebuild several times with different options but this error always occur.

Any idea ?

Thank you so much
Kikokou-san
 
Posts: 26
Joined: Wed Mar 15, 2017 9:55 am

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests