The fix is attached, could someone please check it into CVS if it is appropriate?

I am attempting to build source from 16:00 GMT under Mac OS X.3 with compiler gcc --version
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.

I am getting the following build break building flightgear.

I have also downloaded new plib and simgear and they build with no problems, and with no warnings even in simgear/props.

But when I try to use the downloaded source to build fg, I get the following build break:

g++ -DHAVE_CONFIG_H -I. -I. -I../../src/Include -I../.. -I../../src -I/Users/ima/Desktop/FlightGear/fgdev9.4/include -g -O2 -D_REENTRANT -c -o AIBase.o `test -f 'AIBase.cxx' || echo './'`AIBase.cxx
AIBase.cxx: In member function `virtual void FGAIBase::bind()':
AIBase.cxx:122: error: no matching function for call to `
SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(FGAIBase&, <unknown
type>, <unknown type>)'
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 391: error: candidates
are: SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(const
SGRawValueMethods<FGAIBase, double>&)
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 396: error:
SGRawValueMethods<C, T>::SGRawValueMethods(C&, T (C::*)()
const = 0, void (C::*)(T) = 0) [with C = FGAIBase, T = double]
AIBase.cxx:127: error: no matching function for call to `
SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(FGAIBase&, <unknown
type>, <unknown type>)'
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 391: error: candidates
are: SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(const
SGRawValueMethods<FGAIBase, double>&)
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 396: error:
SGRawValueMethods<C, T>::SGRawValueMethods(C&, T (C::*)()
const = 0, void (C::*)(T) = 0) [with C = FGAIBase, T = double]
AIBase.cxx:131: error: no matching function for call to `
SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(FGAIBase&, <unknown
type>, <unknown type>)'
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 391: error: candidates
are: SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(const
SGRawValueMethods<FGAIBase, double>&)
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 396: error:
SGRawValueMethods<C, T>::SGRawValueMethods(C&, T (C::*)()
const = 0, void (C::*)(T) = 0) [with C = FGAIBase, T = double]
AIBase.cxx:135: error: no matching function for call to `
SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(FGAIBase&, <unknown
type>, <unknown type>)'
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 391: error: candidates
are: SGRawValueMethods<FGAIBase, double>::SGRawValueMethods(const
SGRawValueMethods<FGAIBase, double>&)
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 396: error:
SGRawValueMethods<C, T>::SGRawValueMethods(C&, T (C::*)()
const = 0, void (C::*)(T) = 0) [with C = FGAIBase, T = double]
AIBase.cxx:151: error: no matching function for call to `
SGRawValueMethods<FGAIBase, bool>::SGRawValueMethods(FGAIBase&, <unknown
type>)'
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 391: error: candidates
are: SGRawValueMethods<FGAIBase, bool>::SGRawValueMethods(const
SGRawValueMethods<FGAIBase, bool>&)
/Users/ima/Desktop/FlightGear/fgdev9.4/include/simgear/props/props.hxx: 396: error:
SGRawValueMethods<C, T>::SGRawValueMethods(C&, T (C::*)()
const = 0, void (C::*)(T) = 0) [with C = FGAIBase, T = bool]
make[2]: *** [AIBase.o] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
'make install' done

These resolve to the following aimodal/AIBase.cxx source lines:
   props->tie("velocities/vertical-speed-fps",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         FGAIBase::_getVS_fps,
                                         FGAIBase::_setVS_fps));
122

  props->tie("position/altitude-ft",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         FGAIBase::_getAltitude,
                                         FGAIBase::_setAltitude));
126

   props->tie("position/latitude-deg",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         FGAIBase::_getLatitude,
                                         FGAIBase::_setLatitude));
131

   props->tie("position/longitude-deg",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         FGAIBase::_getLongitude,
                                         FGAIBase::_setLongitude));
135

   props->tie("controls/lighting/nav-lights",
               SGRawValueMethods<FGAIBase,bool>(*this, _isNight));
151

The following changes fix the problem on my system.

Attachment: AIBase.cxx.new
Description: application/text



This is a diff file

Attachment: AIBase.changes
Description: Binary data



Could someone please make these changes to CVS if you find them appropriate? Maybe I'm just missing some simple casts but I couldn't figure this out any other way.

Thanks for your help!  Have a great weekend!

Ima

In case I screwed up the diff (which I do often 8-)), here's the entire new function:

void FGAIBase::bind() {
    double (FGAIBase::*pgVS_fps) () const;
    void (FGAIBase::*psVS_fps) ( double );
        double (FGAIBase::*pga) () const ;
        void (FGAIBase::*psa) ( double ) ;
    bool (FGAIBase::*piN) () const;

pgVS_fps = &FGAIBase::_getVS_fps ;
psVS_fps = &FGAIBase::_setVS_fps ;
pga = &FGAIBase::_getAltitude ;
psa = &FGAIBase::_setAltitude ;
piN = &FGAIBase::_isNight ;

props->tie("id", SGRawValuePointer<int>(&id));
props->tie("velocities/true-airspeed-kt", SGRawValuePointer<double>(&speed));
props->tie("velocities/vertical-speed-fps",
SGRawValueMethods<FGAIBase,double>(*this,
pgVS_fps,
psVS_fps));

   props->tie("position/altitude-ft",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         pga,
                                         psa ));
   props->tie("position/latitude-deg",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         pga,
                                         psa));
   props->tie("position/longitude-deg",
               SGRawValueMethods<FGAIBase,double>(*this,
                                         pga,
                                         psa));

props->tie("orientation/pitch-deg", SGRawValuePointer<double>(&pitch));
props->tie("orientation/roll-deg", SGRawValuePointer<double>(&roll));
props->tie("orientation/true-heading-deg", SGRawValuePointer<double>(&hdg));

props->tie("radar/bearing-deg", SGRawValuePointer<double>(&bearing));
props->tie("radar/elevation-deg", SGRawValuePointer<double>(&elevation));
props->tie("radar/range-nm", SGRawValuePointer<double>(&range));
props->tie("radar/h-offset", SGRawValuePointer<double>(&horiz_offset));
props->tie("radar/v-offset", SGRawValuePointer<double>(&vert_offset));
props->tie("radar/x-shift", SGRawValuePointer<double>(&x_shift));
props->tie("radar/y-shift", SGRawValuePointer<double>(&y_shift));
props->tie("radar/rotation", SGRawValuePointer<double>(&rotation));

   props->tie("controls/lighting/nav-lights",
               SGRawValueMethods<FGAIBase,bool>(*this, piN));
   props->setBoolValue("controls/lighting/beacon", true);
   props->setBoolValue("controls/lighting/strobe", true);
}
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to