Board index FlightGear Support Compiling

SuperBuild(not) on windows ver FlightGear 2017.1.0 (next)

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

SuperBuild(not) on windows ver FlightGear 2017.1.0 (next)

Postby ronh » Sun Nov 27, 2016 7:24 pm

Hello,

I have been working with the SuperBuild on windows wiki, trying to get FlightGear to compile. I have been successful up to a point. I am a new at FlightGear compiling.

1. I followed the instruction on the SuperBuild for Windows.

2. I am using VS 2015 community edition and CMake-gui 3.7. Windows 10 uptodate.

3. I clone the repos as described there and update the cmakelists.txt

4. I am using an updated CMakeLists.txt file from another thread and added the msvc 140/1900 if else
see https://forum.flightgear.org/viewtopic.php?f=45&t=28486 - from hamzaalloush

5. I set cmake to the folders in Superbuild for windows wiki. My case E:/projects/fgmeta with fginstall and fgbuild also.

6. The first thing I had to deal with is CMAKE 3.7 and the missing Compiler - following error:

The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:5 (project):
No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:5 (project):
No CMAKE_CXX_COMPILER could be found.

To fix this you have to run MSBUILD cmd (dos) window, and then run cmake-gui.exe in that cmd window. You need to do this only once. This has to be done due to the missing environment variables for cl location. see http://stackoverflow.com/questions/31619296/cmake-does-not-find-visual-c-compiler

7. Open the solution FlightGear-Meta.sln and compile.

8. OSG does not compile due to some missing and bad cmake args.
fixed the following:

"E:\Projects\fgbuild\osgbuild\ALL_BUILD.vcxproj" (default target) (1) ->
2> "E:\Projects\fgbuild\osgbuild\src\osgPlugins\curl\osgdb_curl.vcxproj" (default target) (33) ->
2> (Link target) ->
2>LINK : fatal error LNK1104: cannot open file 'E:\Projects\fgmeta\windows-3rd-party\msvc140\3rdParty.x64\lib\libcurl_imp.lib' [E:\Projects\fgbuild\osgbuild\src\osgPlugins\curl\osgdb_curl.vcxproj]
2>
2>
2> "E:\Projects\fgbuild\osgbuild\ALL_BUILD.vcxproj" (default target) (1) ->
2> "E:\Projects\fgbuild\osgbuild\src\osgPlugins\ktx\osgdb_ktx.vcxproj" (default target) (56) ->
2> (ClCompile target) ->
2>e:\projects\fgbuild\src\osg\src\osgplugins\ktx\ReaderWriterKTX.h(17): error C2371: 'int8_t': redefinition; different basic types [E:\Projects\fgbuild\osgbuild\src\osgPlugins\ktx\osgdb_ktx.vcxproj]

Had to change cmake libcurl_imp.lib to libcurl.lib

Had to comment out error int8_t in fgbuild - go to osgbuild folder open sln - don't like this but would not compile otherwise.

open osgdb_ktx project

comment out in ktx h file line 17

#ifdef _MSC_VER
//typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif

9. recompile and get the following error in simgear compile.

3> CMake Error at CMakeLists.txt:217 (message):
3> Please rebuild OSG with OSG_USE_UTF8_FILENAME set to ON
3>

Tried adding -DOSG_USE_UTF8_FILENAME:BOOL=ON
to the osg cmake args and did a force rebuild on osg. Still getting the same errors. ( i had this fixed in previous tries, but now still there.)

10. After I got past simgear I had an issue with missing gdal files cpp and .h. in the 3rdparty include folder Is there a step I am missing?

Edit 2016-11-27

11. getting up to flightgear compile and being stopped by this error:
4> CMake Error at CMakeLists.txt:308 (find_package):
4> Could not find a package configuration file provided by "SimGear"
4> (requested version 2017.1.0) with any of the following names:
4>
4> SimGearConfig.cmake
4> simgear-config.cmake
4>
4> Add the installation prefix of "SimGear" to CMAKE_PREFIX_PATH or set
4> "SimGear_DIR" to a directory containing one of the above files. If
4> "SimGear" provides a separate development package or SDK, be sure it has
4> been installed.
4>

I can see the config files in fgbuild/sgbuild/simgear folder but if I set
-DSimGear_DIR=${FGMETA_DIR}/fgbuild/sgbuild/SimGear
I get the same error

edit:

fix error with -DSimGear_DIR=${SG_INSTALL_PREFIX}/lib/cmake/SimGear

updated cmakelists.txt

12. flightgear compile now errors on
4>E:\Projects\fgmeta\flightgear\3rdparty\iaxclient\lib\audio_openal.c(10): fatal error C1083: Cannot open include file: 'AL/al.h': No such file or directory [E:\Projects\fgbuild\fgbuild\3rdparty\iaxclient\lib\iaxclient_lib.vcxproj]
4>
4> 242 Warning(s)
4> 1 Error(s)

the is a folder AL with al.h in the 3rparty folder

Here is the new updated CmakeList.txt file I am using. Would appreciate any help in fixing this.

Ron

Code: Select all
cmake_minimum_required (VERSION 2.8.0)

include (ExternalProject)

project(FlightGear-Meta)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
    message(STATUS "Default install dir set to ${CMAKE_INSTALL_PREFIX}")
endif()

set(SG_DEPS OSG)
set(FG_DEPS SimGear)
set(SG_CMAKE_ARGS "")
set(FG_CMAKE_ARGS "")


set(OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(SG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(FG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(PLIB_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(RTI_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

set(FGMETA_DIR ${CMAKE_CURRENT_LIST_DIR})


# OpenSceneGraph configuration
#set(OSG_SOURCE http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
set(OSG_SOURCE https://github.com/openscenegraph/osg.git)
set(OSG_TAG OpenSceneGraph-3.2)

if (APPLE)
    # force disable Qt and Jasper
    set(OSG_CMAKE_ARGS
        -DOSG_USE_QT=0
        -DJASPER_LIBRARY=
    )
    # OSG with some patches applied for Mac
    set(OSG_SOURCE https://github.com/zakalawe/osg.git)
    set(OSG_TAG fgfs-osg-32)
elseif(MSVC)
    set(OSG_MSVC "msvc")
    if (${MSVC_VERSION} EQUAL 1900)
        set(OSG_MSVC ${OSG_MSVC}140)
    elseif (${MSVC_VERSION} EQUAL 1700)
        set(OSG_MSVC ${OSG_MSVC}110)
    elseif (${MSVC_VERSION} EQUAL 1600)
        set(OSG_MSVC ${OSG_MSVC}100)
    else (${MSVC_VERSION} EQUAL 1700)
        set(OSG_MSVC ${OSG_MSVC}90)
    endif (${MSVC_VERSION} EQUAL 1900)
    set(WinDeps "windows-3rd-party")
    set(MSVC_DIR ${OSG_MSVC})
    if (CMAKE_CL_64)
        set(OSG_MSVC ${OSG_MSVC}-64)
        set(RDPARTY_PREFIX 3rdParty.x64)
        list(APPEND FG_CMAKE_ARGS -DWITH_FGPANEL=OFF)
    else ()
        set(RDPARTY_PREFIX 3rdParty)
    endif (CMAKE_CL_64)
 
    SET(OSG_CMAKE_ARGS
        -DOSG_USE_QT:BOOL=OFF
        -DBUILD_OSG_APPLICATIONS:BOOL=ON
        -DOSG_USE_UTF8_FILENAME:BOOL=ON
        -DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF
        -DACTUAL_3RDPARTY_PREFIX:PATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}
        -DCMAKE_LIBRARY_PATH:STRING=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib
        -DCMAKE_INCLUDE_PATH:STRING=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include;${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include/freetype
        -DCURL_INCLUDE_DIR:PATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include
        -DTIFF_INCLUDE_DIR:PATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include
        -DGDAL_INCLUDE_DIR:PATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include
        -DGDAL_LIBRARY:FILEPATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/gdal_i.lib
        -DTIFF_LIBRARY:FILEPATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/libtiff.lib
        -DCURL_LIBRARY:FILEPATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/libcurl.lib
        -DFREETYPE_LIBRARY:FILEPATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/freetype.lib
        -DFREETYPE_INCLUDE_DIR:PATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include;${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include/freetype
    )

    # for compatability with MSVC directory layout
    set(OSG_INSTALL_PREFIX ${OSG_INSTALL_PREFIX}/${OSG_MSVC}/OpenSceneGraph)
    set(FGRUN_INSTALL_PREFIX ${FGRUN_INSTALL_PREFIX}/${OSG_MSVC}/FGRun)
    set(FG_INSTALL_PREFIX ${FG_INSTALL_PREFIX}/${OSG_MSVC}/FlightGear)
    set(SG_INSTALL_PREFIX ${SG_INSTALL_PREFIX}/${OSG_MSVC}/SimGear)
    #list(APPEND OSG_DEPS WinDeps)
else()
    # normal OSG
endif()


ExternalProject_Add(OSG
    DEPENDS ${OSG_DEPS}
    PREFIX ${CMAKE_BINARY_DIR}
    GIT_REPOSITORY ${OSG_SOURCE}
    GIT_TAG ${OSG_TAG}
    BINARY_DIR osgbuild
    CMAKE_ARGS ${OSG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${OSG_INSTALL_PREFIX}
)

# Because OSG install the libraries in lib64/ instead of lib/

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    ExternalProject_Add_Step(OSG after_install
        COMMAND ${CMAKE_COMMAND} -E create_symlink ${OSG_INSTALL_PREFIX}/lib64 ${OSG_INSTALL_PREFIX}/lib
        DEPENDEES install
    )
endif()

# FIXME install of OpenRTI is failing on Windows, files in PREFIX/share which
# are ending up in C:/Program Files/OpenRTI
if (FALSE)
    ExternalProject_Add(OpenRTI
        PREFIX ${CMAKE_BINARY_DIR}
        DOWNLOAD_COMMAND GIT_REPOSITORY git://git.code.sf.net/p/openrti/OpenRTI
        BINARY_DIR rtibuild
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${RTI_INSTALL_PREFIX}
    )
   
    list(APPEND SG_DEPS OpenRTI)
    list(APPEND SG_CMAKE_ARGS -DENABLE_RTI=1)
    list(APPEND FG_CMAKE_ARGS -DENABLE_RTI=1)
endif()

ExternalProject_Add(SimGear
    PREFIX ${CMAKE_BINARY_DIR}
    DEPENDS ${SG_DEPS}
    DOWNLOAD_COMMAND ""    # no need to download
    UPDATE_COMMAND ""      # or update.
    SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/simgear
    BINARY_DIR sgbuild
    CMAKE_ARGS ${SG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${SG_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX} -DMSVC_3RDPARTY_ROOT=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX} -DBOOST_ROOT=${FGMETA_DIR}/${WinDeps} -DBoost_INCLUDE_DIR=${FGMETA_DIR}/${WinDeps} -DOPENAL_LIBRARY=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/OpenAL32.lib -DOSGTEXT_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgText.lib -DOSGSIM_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgSim.lib -DOSGDB_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgDB.lib -DOSGPARTICLE_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgParticle.lib -DOSGGA_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgGA.lib -DOSGVIEWER_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgViewer.lib -DOSGUTIL_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osgUtil.lib -DOSG_LIBRARY=${OSG_INSTALL_PREFIX}/lib/osg.lib -DOPENTHREADS_LIBRARY=${OSG_INSTALL_PREFIX}/lib/OpenThreads.lib -DZLIB_LIBRARY=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/zlib.lib -DZLIB_INCLUDE_DIR=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include -DCURL_INCLUDE_DIR:PATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include -DCURL_LIBRARY:FILEPATH=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/libcurl.lib -DENABLE_TESTS=OFF -DBUILD_TESTING=OFF
)

# because we download SimGear externally (via Git submodules),
# the change-detection doesn't work. Ensure we always change
# for changes
ExternalProject_Add_Step(SimGear forcebuild
        ALWAYS 1
        COMMAND ${CMAKE_COMMAND} -E echo foo
        DEPENDERS build
    )
   
# on Windows, PLIB is in the 3rd-party dependencies zip
if (NOT WIN32)
    set(PLIB_ARGS --disable-pw --disable-sl --disable-psl --disable-ssg --disable-ssgaux)

    ExternalProject_Add(PLIB
        PREFIX ${CMAKE_BINARY_DIR}
        URL http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz
        URL_HASH MD5=47a6fbf63668c1eed631024038b2ea90
        CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PLIB_INSTALL_PREFIX} ${PLIB_ARGS}
        BUILD_IN_SOURCE 1
    )
   
    list(APPEND FG_DEPS PLIB)
endif()

ExternalProject_Add(FlightGear
    PREFIX ${CMAKE_BINARY_DIR}
    DEPENDS ${FG_DEPS}
    DOWNLOAD_COMMAND ""    # no need to download
    UPDATE_COMMAND ""      # or update.
    SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
    BINARY_DIR fgbuild
    CMAKE_ARGS ${FG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${FG_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX} -DADDITIONAL_LIBRARY_PATHS=${SG_INSTALL_PREFIX} -DMSVC_3RDPARTY_ROOT=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX} -DBOOST_ROOT=${FGMETA_DIR}/${WinDeps} -DBoost_INCLUDE_DIR=${FGMETA_DIR}/${WinDeps} -DZLIB_LIBRARY=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/zlib.lib -DZLIB_INCLUDE_DIR=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/include -DOPENAL_LIBRARY=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/OpenAL32.lib -DPLIB_INCLUDE_DIR=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/plib/include -DPLIB_UL_LIBRARY_RELEASE=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/ul.lib -DPLIB_PUI_LIBRARY_RELEASE=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/pui.lib -DPLIB_SG_LIBRARY_RELEASE=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/sg.lib -DPLIB_PUAUX_LIBRARY_RELEASE=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/puAux.lib -DPLIB_JS_LIBRARY_RELEASE=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/js.lib -DPLIB_FNT_LIBRARY_RELEASE=${FGMETA_DIR}/${WinDeps}/${MSVC_DIR}/${RDPARTY_PREFIX}/lib/fnt.lib -DOSGTEXT_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGSIM_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGDB_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGPARTICLE_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGFX_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGUTIL_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGVIEWER_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSGGA_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOSG_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DOPENTHREADS_LIBRARY=${OSG_INSTALL_PREFIX}/lib -DSimGear_DIR=${SG_INSTALL_PREFIX}/lib/cmake/SimGear -DENABLE_QT=OFF
)

# because we download FlightGear externally (via Git submodules),
# the change-detection doesn't work. Ensure we always change
# for changes
ExternalProject_Add_Step(FlightGear forcebuild
        ALWAYS 1
        COMMAND ${CMAKE_COMMAND} -E echo foo
        DEPENDERS build
    )
Last edited by ronh on Mon Nov 28, 2016 3:32 pm, edited 3 times in total.
ronh
 
Posts: 26
Joined: Sun Nov 27, 2016 5:45 pm
Location: Ontario, Canada
Version: next
OS: Windows 10 Ubuntu 18

Re: SuperBuild on windows ver FlightGear 2017.1.0(next)

Postby ronh » Mon Nov 28, 2016 5:01 am

Well the superbuild as it stands, was the wrong path. After getting it to completely compile and comparing thing to 2016.4.2 I see that OSG is being compile as 3.2 when ver 3.4 is in the existing release code. The CmakeLists.txt in fgmeta is really out of date.

Checking the Jenkins build server provides a more recent version of files to try to compile.

So FYI the wiki for Superbuild on windows will not work without a lot of fixes and updating. Hey it's a learning process.
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: SuperBuild on windows ver FlightGear 2017.1.0 (next)

Postby wkitty42 » Mon Nov 28, 2016 1:04 pm

OSG 3.2 is still quite viable... it is also the minimum version of OSG that is usable... it is what i use on my kubuntu 14.04.5 system when i build the entire sim... i do that most every day that there are code updates... oh, and yeah, i do build my own OSG from the FG repos instead of using the one installed on my system ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: SuperBuild on windows ver FlightGear 2017.1.0 (next)

Postby ronh » Mon Nov 28, 2016 3:31 pm

Thanks for the tip/info. I am now going to try the CMAKE for Windows wiki solution, seems that is a closer match to the folder structure for the windows build. My mistake was starting with the superbuild and the cmakelists.txt file in the root fgmeta folder.

What I should have noticed was the build_release_windows.bat file. That's the clue to cmake for windows.
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: SuperBuild(not) on windows ver FlightGear 2017.1.0 (next

Postby wkitty42 » Mon Nov 28, 2016 8:44 pm

i would have started with FGMeta as well if i had known about it... as it was, i found the download_and_compile.sh script in the wiki and jumped on that for my start in building next... good luck in your attempts on winwhatever :)

PS: are you one of the new posters to the dev list in the last week or so? there was one looking to get started and working with the windows builds to help take some load off of james... i'm just trying to get the names and monikers straight ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: SuperBuild(not) on windows ver FlightGear 2017.1.0 (next

Postby ronh » Tue Nov 29, 2016 3:11 am

I have started with OSG-Win from the jenkins server and found a problem that seems to be in the build server also. the 64 compile does not work. Gets an error OSG error WINGDIAPI. this can be fixed with adding

ADD_DEFINITIONS(-DWIN32)
to the source CmakeLists.txt file around line 314.

I now get the following error.

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)

So something else is wrong, because I can compile the OSG-master just fine with the WIN32 fix but it is ver 3.5.

I have added myself to the devel mail list but have not started any threads. I just add my email and was just lurking. I would be happy to help with Windows stuff, but just wanted to get my feet wet first. :mrgreen:
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 4 guests