Board index FlightGear Support Compiling

Compiling FlightGear on Windows 10

Building FlightGear from source, and in the need for help?

Compiling FlightGear on Windows 10

Postby blewis » Sat Feb 06, 2016 6:42 pm

Hi there,

I'm having real trouble building FlightGear on Windows 10.

First I tried to use Cmake to create a project for SimGear and FlightGear which I could build in Visual Studio 2015 - but it didn't work.

So then I got hold of Visual C++ 2010 Express because it seemed like FlightGear was best supported by VS2010.

Cmake still wouldn't work for 64 bit because I couldn't install the Windows SDK 7.1 on Windows 10.

So I tried to build as 32 bit.

This almost worked - Cmake worked - so then I compiled SimGear and FlightGear in Visual C++ 2010 Express. However, when I ran fgfs.exe following this, it crashed. Excerpt from crash report below.

Notes: This was for building Flight Gear, Sim Gear and Flight Gear data release 3.6.0, but I've also tried 3.4.0 and this also crashed on running FlightGear.

Any suggestions for how to resolve this or how to get FlightGear to compile on Windows 10 would be greatly appreciated!!!

fgfs.log:
Code: Select all
general:3:..\..\..\..\flightgear\src\Main\main.cxx:390:CrashRpt enabled
general:3:..\..\..\..\flightgear\src\Main\main.cxx:415:FlightGear:  Version 3.6.0
general:3:..\..\..\..\flightgear\src\Main\main.cxx:416:Built with Microsoft Visual C++ version 1600
general:3:..\..\..\..\flightgear\src\Main\main.cxx:418:Jenkins number/ID 0:none
general:3:..\..\..\..\flightgear\src\Main\options.cxx:2485:fg_root = ..\data
input:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:467:Reading global preferences
input:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:469:Finished Reading global preferences
input:3:..\..\..\..\flightgear\src\Main\options.cxx:2001:No user specified aircraft, using default
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:249:Loading aircraft -set file from:G:/Git/FGFS/install/msvc100/FlightGear/data/Aircraft/c172p/c172p-set.xml
general:3:..\..\..\..\flightgear\src\Main\locale.cxx:138:Found language resource for: en_GB
general:3:..\..\..\..\flightgear\src\Main\locale.cxx:219:Reading localized strings for 'en' from G:/Git/FGFS/install/msvc100/FlightGear/data/Translations/en/sys.xml
general:3:..\..\..\..\flightgear\src\Main\locale.cxx:219:Reading localized strings for 'en' from G:/Git/FGFS/install/msvc100/FlightGear/data/Translations/en/atc.xml
general:3:..\..\..\..\flightgear\src\Main\options.cxx:2265:Using default download dir: C:/Users/Ben/Documents/FlightGear
general:3:..\..\..\..\flightgear\src\Main\options.cxx:2286:Using default TerraSync: C:/Users/Ben/Documents/FlightGear/TerraSync
astro:3:..\..\..\simgear\simgear\scene\sky\cloud.cxx:343:initializing cloud layers
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
general:5:..\..\..\..\flightgear\src\Main\main.cxx:491:Enabling ATI viewport hack
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:669:Configuration State
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:670:======= ==============
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:672:aircraft-dir = "G:/Git/FGFS/install/msvc100/FlightGear/data/Aircraft/c172p"
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:673:fghome-dir = "C:\Users\Ben\AppData\Roaming\flightgear.org"
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:674:download-dir = ""
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:675:terrasync-dir = "C:/Users/Ben/Documents/FlightGear/TerraSync"
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:677:aircraft-search-paths =
   
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:678:scenery-search-paths =
   C:/Users/Ben/Documents/FlightGear/TerraSync
   C:/Users/Ben/Documents/FlightGear/TerraSync/Terrain
   C:/Users/Ben/Documents/FlightGear/TerraSync/Objects
   
   G:/Git/FGFS/install/msvc100/FlightGear/data/Scenery
   G:/Git/FGFS/install/msvc100/FlightGear/data/Scenery/Terrain
   G:/Git/FGFS/install/msvc100/FlightGear/data/Scenery/Objects
   
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
view:3:..\..\..\..\flightgear\src\Viewer\splash.cxx:445:Splash screen progress init
general:3:..\..\..\..\flightgear\src\GUI\gui.cxx:115:ATI Technologies Inc.
general:3:..\..\..\..\flightgear\src\GUI\gui.cxx:118:AMD FirePro W4100
general:3:..\..\..\..\flightgear\src\GUI\gui.cxx:121:4.5.13399 Compatibility Profile Context FireGL 15.201.1151.1008
general:3:..\..\..\..\flightgear\src\GUI\gui.cxx:131:4.40
view:3:..\..\..\..\flightgear\src\Viewer\splash.cxx:445:Splash screen progress loading-aircraft-list
view:3:..\..\..\..\flightgear\src\Viewer\splash.cxx:445:Splash screen progress loading-nav-dat
navaid:3:..\..\..\..\flightgear\src\Navaids\NavDataCache.cxx:257:NavCache at:Path "C:/Users/Ben/AppData/Roaming/flightgear.org/navdata_3_6.cache"
navaid:3:..\..\..\..\flightgear\src\Navaids\NavDataCache.cxx:1199:NavCache: no main cache rebuild required
view:3:..\..\..\..\flightgear\src\Viewer\splash.cxx:445:Splash screen progress init-scenery
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:637:General Initialization
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:638:======= ==============
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:648:FG_ROOT = "G:\Git\FGFS\install\msvc100\FlightGear\data"

general:3:..\..\..\..\flightgear\src\Main\positioninit.cxx:159:Attempting to set starting position from airport code KSFO heading 270
event:3:..\..\..\simgear\simgear\timing\sg_time.cxx:91:Reading timezone info from: G:/Git/FGFS/install/msvc100/FlightGear/data/Timezone/zone.tab
view:3:..\..\..\..\flightgear\src\Viewer\splash.cxx:445:Splash screen progress creating-subsystems
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:687:Creating Subsystems
general:3:..\..\..\..\flightgear\src\Main\fg_init.cxx:688:========== ==========
input:3:..\..\..\simgear\simgear\scene\material\matlib.cxx:74:Reading materials from G:/Git/FGFS/install/msvc100/FlightGear/data/Materials/regions/materials.xml
terrain:3:..\..\..\simgear\simgear\scene\material\matlib.cxx:97:Loading region Global Summer
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
...
input:5:..\..\..\simgear\simgear\scene\material\TextureBuilder.cxx:279:failed to load effect texture file G:/Git/FGFS/install/msvc100/FlightGear/data/Textures/Runway/pa_7r.png
io:4:..\..\..\simgear\simgear\scene\model\ModelRegistry.cxx:201:Image loading failed:
input:5:..\..\..\simgear\simgear\scene\material\TextureBuilder.cxx:279:failed to load effect texture file G:/Git/FGFS/install/msvc100/FlightGear/data/Textures/Runway/pa_7r.png
general:3:..\..\..\simgear\simgear\scene\material\matlib.cxx:247:SGMaterialCache::~SGMaterialCache() size=286
general:3:..\..\..\simgear\simgear\scene\material\matlib.cxx:247:SGMaterialCache::~SGMaterialCache() size=286
input:5:..\..\..\simgear\simgear\scene\material\matmodel.cxx:132:Failed to load object Models/Buildings/brick-school.ac
input:5:..\..\..\simgear\simgear\scene\material\matmodel.cxx:132:Failed to load object Models/Buildings/bank-building.ac


crashrpt.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<CrashRpt version="1402">
    <CrashGUID>87edf3d7-dbfc-49db-9965-7081c2c42977</CrashGUID>
    <AppName>FlightGear</AppName>
    <AppVersion>3.6.0</AppVersion>
    <ImageName>G:\Git\FGFS\install\msvc100\FlightGear\bin\fgfs.exe</ImageName>
    <OperatingSystem>Windows 10 Pro Build 10586</OperatingSystem>
    <OSIs64Bit>1</OSIs64Bit>
    <GeoLocation>en-gb</GeoLocation>
    <SystemTimeUTC>2016-02-06T17:11:53Z</SystemTimeUTC>
    <ExceptionAddress>0x1531a59</ExceptionAddress>
    <ExceptionModule>G:\Git\FGFS\install\msvc100\FlightGear\bin\fgfs.exe</ExceptionModule>
    <ExceptionModuleBase>0xfb0000</ExceptionModuleBase>
    <ExceptionModuleVersion>0.0.0.0</ExceptionModuleVersion>
    <ExceptionType>11</ExceptionType>
    <GUIResourceCount>14</GUIResourceCount>
    <OpenHandleCount>2465</OpenHandleCount>
    <MemoryUsageKbytes>300100</MemoryUsageKbytes>
    <CustomProps>
        <Prop name="git-revision" value="none" />
        <Prop name="hudson-build-id" value="none" />
        <Prop name="hudson-build-number" value="0" />
    </CustomProps>
    <FileList>
        <FileItem name="crashdump.dmp" description="Crash Minidump" />
        <FileItem name="crashrpt.xml" description="Crash Description XML" />
        <FileItem name="fgfs.log" description="FlightGear Log File" />
    </FileList>
</CrashRpt>
blewis
 
Posts: 2
Joined: Thu Feb 04, 2016 1:04 pm

Re: Compiling FlightGear on Windows 10

Postby hamzaalloush » Sat Feb 06, 2016 11:26 pm

Take a look if you have the C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 directory,

I've also not been able to run to configure CMake to generate for a "Visual Studio 10 2010 Win64" compiler, turns out a bug in SP1 upgrade removes AMD64 and IA64 compilers, therefore need to apply this patch before continue:

https://support.microsoft.com/en-us/kb/2519277

http://wiki.flightgear.org/Superbuild_on_Windows#Troubleshootings

I suggest you fix it for 64-bit build and try again.
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: Compiling FlightGear on Windows 10

Postby blewis » Thu Feb 11, 2016 6:48 pm

I don't really know what I changed after all - I think just how I ran it, but it now works. I'm working on a 64 bit version, but this seems good now :)
blewis
 
Posts: 2
Joined: Thu Feb 04, 2016 1:04 pm

Re: Compiling FlightGear on Windows 10

Postby mich » Thu Dec 22, 2016 4:04 pm

Sorry guys,

I am having trouble too compiling SimGear and FlightGear on Windows10. Could you explain me step by step what to do?

Thanks
Mich
mich
 
Posts: 22
Joined: Fri Nov 11, 2016 11:08 am

Re: Compiling FlightGear on Windows 10

Postby mich » Sat Jan 07, 2017 10:49 am

Hi guys,

I am trying to compile Flightgear whit VisualStudio2015. It gives me an error which I can not understand the cause:
Code: Select all
identificatore "getcwd" non definito    fgpanel      C:\fgclone\flightgear-flightgear\utils\fgpanel\ApplicationProperties.cxx   34
'getcwd': identificatore non trovato    fgpanel      C:\fgclone\flightgear-flightgear\utils\fgpanel\ApplicationProperties.cxx   34   


Could you help me?
Mich
mich
 
Posts: 22
Joined: Fri Nov 11, 2016 11:08 am

Re: Compiling FlightGear on Windows 10

Postby erik » Sat Jan 07, 2017 11:20 am

I've pushed a fix for this to GIT.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Compiling FlightGear on Windows 10

Postby mich » Sat Jan 07, 2017 11:24 am

Yeh, I just see it, but it doesn't work, I am working on windows.

I searched the web and found to insert
#include <direct.h>
instead <unistd.h>

but now, I found another error:
Code: Select all
impossibile to open file 'freeglut.lib'    fgpanel    C:\fgfsProva\build\flightgear\utils\fgpanel\LINK    1
Mich
mich
 
Posts: 22
Joined: Fri Nov 11, 2016 11:08 am

Re: Compiling FlightGear on Windows 10

Postby erik » Sat Jan 07, 2017 2:12 pm

That line indicates you need to install the freeglut development libraries.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Compiling FlightGear on Windows 10

Postby erik » Sat Jan 07, 2017 2:14 pm

mich wrote in Sat Jan 07, 2017 11:24 am:Yeh, I just see it, but it doesn't work, I am working on windows.

I searched the web and found to insert
#include <direct.h>


Would that be <dirent.h> instead of <direct.h> by any chance?

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Compiling FlightGear on Windows 10

Postby mich » Sat Jan 07, 2017 6:27 pm

no, not dirent, but direct :)

and as for freeglut... I have it, I have inserted freeglut.lib, but it doesn't work :(
Mich
mich
 
Posts: 22
Joined: Fri Nov 11, 2016 11:08 am

Re: Compiling FlightGear on Windows 10

Postby erik » Sat Jan 07, 2017 10:56 pm

Geoff has just posted a set of patches on the developers list which should fix the Windows build.
I'll apply them tomorrow.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Compiling FlightGear on Windows 10

Postby mich » Sun Jan 08, 2017 10:17 am

Sorry erik, i am new... :oops:
where? Could you swnd me a link?
Thanks :D
Mich
mich
 
Posts: 22
Joined: Fri Nov 11, 2016 11:08 am

Re: Compiling FlightGear on Windows 10

Postby erik » Sun Jan 08, 2017 10:28 am

It's now committed to the git repository.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Compiling FlightGear on Windows 10

Postby mich » Sun Jan 08, 2017 10:33 am

Thanks :)

But, does he modify only the flightgear repository?
Mich
mich
 
Posts: 22
Joined: Fri Nov 11, 2016 11:08 am

Re: Compiling FlightGear on Windows 10

Postby erik » Sun Jan 08, 2017 11:19 am

Yes, if you update the FlightGear git repository and run cmake again then it should compile fine.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Next

Return to Compiling

Who is online

Users browsing this forum: No registered users and 4 guests