Board index FlightGear Support Compiling

Compiling Errors

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

Compiling Errors

Postby TYothers » Tue Mar 01, 2011 5:40 pm

I've been trying to compile FlightGear and I've come across some problems that I can't seem to resolve, and could use some help with. I will go through all of the steps to clarify my setup. Most importantly, my compiler is Visual Studio .NET 2003 (msvc71) on a Windows XP machine.

I began using this tutorial on a Windows setup:
http://wiki.flightgear.org/index.php/Building_FlightGear_-_Windows

There were a few minor issues that I had to work around. Primarily, I realized that CVS is no longer used. Unable to get 'git' to successfully work, I was able to download FlightGear and SimGear from their respective website references:
http://ftp.linux.kiev.ua/pub/fgfs/Source/FlightGear-2.0.0.tar.gz
ftp://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/SimGear-2.0.0.tar.gz

Also, I have no real need to compile OpenSceneGraph, so I used the tutorials instructions on using the binaries instead.

There were a few minor issues on the setup that were easy enough to overcome. All the header references to plib were in an unrecognized path from the location the tutorial insisted upon. I simply tossed plib into a recognized path (3rdParty/include) and moved on. It looks like this person was having the same problems: http://www.flightgear.org/forums/viewtopic.php?f=45&t=5187

Also, the projects were all referencing boost 1.36 while the tutorial referenced boost 1.39. I first tried to download 1.36, trusting that the projects were certain of what they wanted. On the boost website, however, this download is missing headers (boost\tr1\unordered_map.hpp). When switching the projects to reference 1.39, things seemed a bit happier as this file was not missing in 1.39.

Now everything seems fine with the dependent libraries, but I am getting build errors. Specifically these four are repeated about 500 times (due to this file being referenced a great deal):

c:\FlightGear\simgear\simgear\props\props.hxx(1895): error C2244: 'getValue' : unable to match function definition to an existing declaration
c:\FlightGear\simgear\simgear\props\props.hxx(1902): error C2244: 'getValue' : unable to match function definition to an existing declaration
    definition
    'T SGPropertyNode::getValue(boost::enable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *) const'
    existing declarations
    'T SGPropertyNode::getValue(boost::disable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *) const'
    'T SGPropertyNode::getValue(boost::enable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *) const'
c:\FlightGear\simgear\simgear\props\props.hxx(1931): error C2244: 'setValue' : unable to match function definition to an existing declaration
    definition
    'bool SGPropertyNode::setValue(const T &,boost::disable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *)'
    existing declarations
    'bool SGPropertyNode::setValue(const char (&)[N])'
    'bool SGPropertyNode::setValue(const T &,boost::disable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *)'
    'bool SGPropertyNode::setValue(const T &,boost::enable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *)'
c:\FlightGear\simgear\simgear\props\props.hxx(1939): error C2244: 'setValue' : unable to match function definition to an existing declaration
    definition
    'bool SGPropertyNode::setValue(const T &,boost::enable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *)'
    existing declarations
    'bool SGPropertyNode::setValue(const char (&)[N])'
    'bool SGPropertyNode::setValue(const T &,boost::disable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *)'
    'bool SGPropertyNode::setValue(const T &,boost::enable_if_c<simgear::props::PropertyTraits<T>::Internal>::type *)'
c:\FlightGear\simgear\simgear\scene\util\CopyOp.hxx(29): error C2039: '__ctor' : is not a member of 'simgear::CopyOp'

Now the first four errors are claiming a mismatch in declaration and definition, but both of these exist in "c:\flightgear\simgear\simgear\props\props.hxx".

Here is the definition on line 1161:
Code: Select all
template<typename T>
  T getValue(typename boost::enable_if_c<simgear::props::PropertyTraits<T>::Internal>
             ::type* dummy = 0) const;


Here is the declaration on line 1897:
Code: Select all
template<typename T>
inline T SGPropertyNode::getValue(typename boost::enable_if_c<simgear::props
                                  ::PropertyTraits<T>::Internal>::type* dummy) const


I believe this might have to do with the templated struct enable_if_c being identical to disable_if_c possibly? Perhaps the compiler can't distinguish between these two templated structs simply by typename?

Also, the last error occurs in "c:\flightgear\simgear\simgear\scene\util\copyop.hxx" at line 29:
Code: Select all
    CopyOp(osg::CopyOp::CopyFlags flags = osg::CopyOp::SHALLOW_COPY)
        : osg::CopyOp(flags)
    {
    }


The error being that the constructor is not a member of simger::CopyOp. This is the definition/declaration of the constructor in the header file. I don't see how it cannot be a member.

If anybody could please offer some insight or assistance with this, it would be greatly appreciated. Thank you.
TYothers
 
Posts: 21
Joined: Wed Feb 09, 2011 7:52 pm

Re: Compiling Errors

Postby nico » Mon Jun 27, 2011 3:03 pm

Hello,
I got exactly the same problems.
Did you make some progress?
nico
 
Posts: 1
Joined: Mon Jun 27, 2011 2:56 pm


Return to Compiling

Who is online

Users browsing this forum: No registered users and 5 guests