On Wed, 22 Jan 2003 07:50:55 -0600 "Jon Berndt" <[EMAIL PROTECTED]> wrote:
> > Wouldn't something like this work? > > > > Either: > > > > using namespace jsbsim > > > > or > > > > using jsbsim::FGFDMExec > > etc... > > > > at the top of the files > > > > or > > > > fdmex = new jsbsim::FGFDMExec > > etc... > > > > everytime its needed. > > > > Cheers - Dave > > > You would expect it to, wouldn't you. I added "using namespace JSBSim" at > the top of JSBSim.hxx as follows: > > /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > %%%%%% > FORWARD DECLARATIONS > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > %%%%*/ > > #include <simgear/misc/props.hxx> > > #include <FDM/JSBSim/FGFDMExec.h> > > using namespace JSBSim; > > class FGState; > class FGAtmosphere; > class FGFCS; > class FGPropulsion; > class FGMassBalance; > class FGAerodynamics; > class FGInertial; > class FGAircraft; > class FGTranslation; > class FGRotation; > class FGPosition; > class FGAuxiliary; > class FGOutput; > class FGInitialCondition; > > But, I get this when I try and compile: > > g++ -DHAVE_CONFIG_H -I. -I. -I../../../src/Include -I../../.. -I../../../s > rc -DFGFS -c -o JSBSim.o `test -f 'JSBSim.cxx' || echo './'`JSBSim.cxx > In file included from JSBSim.cxx:63: > JSBSim.hxx:218: syntax error before `*' > JSBSim.hxx:221: syntax error before `*' > JSBSim.hxx:222: syntax error before `*' > JSBSim.hxx:223: syntax error before `*' > JSBSim.hxx:224: syntax error before `*' > JSBSim.hxx:225: syntax error before `*' > JSBSim.hxx:226: syntax error before `*' > JSBSim.hxx:227: syntax error before `*' > JSBSim.hxx:228: syntax error before `*' > JSBSim.hxx:229: syntax error before `*' > JSBSim.hxx:230: syntax error before `*' > JSBSim.hxx:231: syntax error before `*' > JSBSim.cxx: In method `FGJSBsim::FGJSBsim(double)': > JSBSim.cxx:81: parse error before `=' > JSBSim.cxx:82: `Atmosphere' undeclared (first use this function) > JSBSim.cxx:82: (Each undeclared identifier is reported only once > JSBSim.cxx:82: for each function it appears in.) > JSBSim.cxx:83: `FCS' undeclared (first use this function) > JSBSim.cxx:84: `MassBalance' undeclared (first use this function) > ... > ... Forward declarations must be in a namespace: namespace JSBSim { class FGState; class FGAtmosphere; class FGFCS; class FGPropulsion; class FGMassBalance; class FGAerodynamics; class FGInertial; class FGAircraft; class FGTranslation; class FGRotation; class FGPosition; class FGAuxiliary; class FGOutput; class FGInitialCondition; } using namespace JSBSim; ... Just updated my FlightGear JSBSim sources with namespace versions and am happy to announce a clean compile. Cheers, Bernie _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel