Board index FlightGear Support Compiling

OSG-Win compile 64 bit (from Jenkins build server)

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

OSG-Win compile 64 bit (from Jenkins build server)

Postby ronh » Tue Nov 29, 2016 11:34 pm

I am trying to compile the OSG-Win files from the jenkins build server. It won't compile for me. I am wondering if there are 64bit and 32 bit versions. The folder structure seems to indicate that. However if you review the file s downloaded from the build server there is an error log in the OSG-Win\build64\CMakeFiles folder.

It shows the same error that I get. So is the build server NOT compiling the OSG-Win 64 bit version?

Here is the error. re: WINGDIAPI

C:\Program Files (x86)\Windows Kits\8.1\Include\um\GL/gl.h(1157): note: see declaration of 'WINGDIAPI'

C:\Program Files (x86)\Windows Kits\8.1\Include\um\GL/gl.h(1164): error C2182: 'APIENTRY': illegal use of type 'void' [G:\Jenkins\workspace\OSG-Win\build64\CMakeFiles\CMakeTmp\cmTryCompileExec1216618913.vcxproj]


to "fix" this error and use VS2015 you need to add a line to the CmakeLists.txt file.

somewhere around line 314

ADD_DEFINITIONS(-DWIN32)

The OSG-Win will compile most of the files but there are still some link errors.

6> Generating Code...
6> Creating library E:/Projects/OSG-Win/build64/lib/osgDB.lib and object E:/Projects/OSG-Win/build64/lib/osgDB.exp
6>Compressors.obj : error LNK2019: unresolved external symbol deflate referenced in function "public: virtual bool __cdecl ZLibCompressor::compress(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?compress@ZLibCompressor@@UEAA_NAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z)

Yes I know I don't have to compile the OSG system, but I would like to see if I can. Does anyone know how to fix these issues.

I can download the OpenSceneGraph-master and it will compile with the WIN32 fix under CMAKE 3.7 and VS2015. But that is version oSG 3.7
Ron
Windows 10 VS 2015, 2017
Ubuntu 18.04 LTS
ronh
 
Posts: 26
Joined: Sun Nov 27, 2016 5:45 pm
Location: Ontario, Canada
Version: next
OS: Windows 10 Ubuntu 18

Re: OSG-Win compile 64 bit (from Jenkins build server)

Postby ronh » Wed Nov 30, 2016 2:05 pm

Ok, I have finally got things to compile.

The trick is to use the CmakeCache.txt files in each of the build folders that get downloaded with the Jenkins build server zip. They have the correct variables already assigned.

Get your favourite text editor (notepad++). Open the cmakecache.txt (not cmakelists.txt). Replace all G:\Jenkins\Workspace with your folder setup - mine is E:\Projects.

Now when you open cmake-gui and find the source folder you will have the proper values to "configure" and then "generate" your build environment.

Open VS2015 and open the OSG-Win solution (similarly SimGear-Win, FGRun-Win and FlightGear-Win solutions) and compile. This time no changes like I suggested before need to be done. (no WIN32)

HTH
Ron
Windows 10 VS 2015, 2017
Ubuntu 18.04 LTS
ronh
 
Posts: 26
Joined: Sun Nov 27, 2016 5:45 pm
Location: Ontario, Canada
Version: next
OS: Windows 10 Ubuntu 18


Return to Compiling

Who is online

Users browsing this forum: No registered users and 8 guests