[Flightgear-devel] cygwin build from cvs

2003-11-04 Thread John Barrett
Having finally gotten a windows cvs client that can be configured not to
munge *nix eol :) I've just gotten plib, simgear, and flightgear cvs
versions and am trying to build each package. plib built up just fine, but
simgear is failing due to macro definitions in one of 2 places

[EMAIL PROTECTED] ~/Desktop/FlightSim/Devel/cvsroot/SimGear
$ grep -r min\( */*
simgear/metar/Local.h:#  define min(x, y)(((x)  (y)) ? (x) : (y))
simgear/timing/lowleveltime.cxx:#define min(a, b)   ((a)  (b) ? (a) :
(b))

[EMAIL PROTECTED] ~/Desktop/FlightSim/Devel/cvsroot/SimGear
$ grep -r max\( */*
simgear/metar/Local.h:#  define max(x, y)(((x)  (y)) ? (y) : (x))
simgear/timing/lowleveltime.cxx:#define max(a, b)   ((a)  (b) ? (a) :
(b))

One of those include files is causing THIS when I compile:

Making all in bucket
make[3]: Entering directory `/cygdrive/c/Documents and
Settings/jbarrett/Desktop/FlightSim/Devel/cvsroot/SimGear/simgear/bucket'
if
++ -DHAVE_CONFIG_H -I. -I. -I../../simgear -I../..  -I/usr/local/include  -g
 -O2 -D_REENTRANT -MT newbucket.o -MD -MP -MF .deps/newbucket.Tpo \
  -c -o newbucket.o `test -f 'newbucket.cxx' || echo './'`newbucket.cxx; \
then mv -f .deps/newbucket.Tpo .deps/newbucket.Po; \
else rm -f .deps/newbucket.Tpo; exit 1; \
fi
In file included from /usr/include/c++/3.3.1/bits/locale_facets.tcc:43,
 from /usr/include/c++/3.3.1/locale:47,
 from /usr/include/c++/3.3.1/bits/ostream.tcc:37,
 from /usr/include/c++/3.3.1/ostream:535,
 from /usr/include/c++/3.3.1/iostream:45,
 from newbucket.hxx:44,
 from newbucket.cxx:31:
/usr/include/c++/3.3.1/limits:205:22: macro min requires 2 arguments, but
only 1 given
In file included from /usr/include/c++/3.3.1/bits/locale_facets.tcc:43,
 from /usr/include/c++/3.3.1/locale:47,
 from /usr/include/c++/3.3.1/bits/ostream.tcc:37,
 from /usr/include/c++/3.3.1/ostream:535,
 from /usr/include/c++/3.3.1/iostream:45,
 from newbucket.hxx:44,
 from newbucket.cxx:31:
/usr/include/c++/3.3.1/limits:205: error: syntax error before `throw'
/usr/include/c++/3.3.1/limits:206:22: macro max requires 2 arguments, but
only 1 given
/usr/include/c++/3.3.1/limits:206: error: ISO C++ forbids defining types
within
   return type
/usr/include/c++/3.3.1/limits:206: error: syntax error before `throw'
/usr/include/c++/3.3.1/limits:206: error: syntax error before `throw'
/usr/include/c++/3.3.1/limits:207: error: syntax error before `(' token

/usr/include/c++/3.1.1/limits is declaring a struct with several functions,
two of them named min() and max(), apparently intended to return the minimum
and maximum legal values of a given datatype -- from c++/.../limits:

struct numeric_limits : public __numeric_limits_base
{
  static _Tp min() throw() { return static_cast_Tp(0); }
  static _Tp max() throw() { return static_cast_Tp(0); }
  static _Tp epsilon() throw() { return static_cast_Tp(0); }
  static _Tp round_error() throw() { return static_cast_Tp(0); }
  static _Tp infinity() throw()  { return static_cast_Tp(0); }
  static _Tp quiet_NaN() throw() { return static_cast_Tp(0); }
  static _Tp signaling_NaN() throw() { return static_cast_Tp(0); }
  static _Tp denorm_min() throw() { return static_cast_Tp(0); }
};

I would guess one of the simgear includes is getting loaded before the chain
of includes that loads limits, causing this error

in newbucket.hxx, moving the line
  #include STL_IOSTREAM
just after compiler.h is included, but before constants.h is included fixes
the problem


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] cygwin build from cvs

2003-11-04 Thread John Barrett
Disregard -- I had SimGear-0.2 downloaded :)

- Original Message - 
From: John Barrett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 10:06 PM
Subject: [Flightgear-devel] cygwin build from cvs


 Having finally gotten a windows cvs client that can be configured not to
 munge *nix eol :) I've just gotten plib, simgear, and flightgear cvs
 versions and am trying to build each package. plib built up just fine, but
 simgear is failing due to macro definitions in one of 2 places

 [EMAIL PROTECTED] ~/Desktop/FlightSim/Devel/cvsroot/SimGear
 $ grep -r min\( */*
 simgear/metar/Local.h:#  define min(x, y)(((x)  (y)) ? (x) : (y))
 simgear/timing/lowleveltime.cxx:#define min(a, b)   ((a)  (b) ? (a) :
 (b))

 [EMAIL PROTECTED] ~/Desktop/FlightSim/Devel/cvsroot/SimGear
 $ grep -r max\( */*
 simgear/metar/Local.h:#  define max(x, y)(((x)  (y)) ? (y) : (x))
 simgear/timing/lowleveltime.cxx:#define max(a, b)   ((a)  (b) ? (a) :
 (b))

 One of those include files is causing THIS when I compile:

 Making all in bucket
 make[3]: Entering directory `/cygdrive/c/Documents and
 Settings/jbarrett/Desktop/FlightSim/Devel/cvsroot/SimGear/simgear/bucket'
 if

+ -DHAVE_CONFIG_H -I. -I. -I../../simgear -I../..  -I/usr/local/include  -g
  -O2 -D_REENTRANT -MT newbucket.o -MD -MP -MF .deps/newbucket.Tpo \
   -c -o newbucket.o `test -f 'newbucket.cxx' || echo './'`newbucket.cxx; \
 then mv -f .deps/newbucket.Tpo .deps/newbucket.Po; \
 else rm -f .deps/newbucket.Tpo; exit 1; \
 fi
 In file included from /usr/include/c++/3.3.1/bits/locale_facets.tcc:43,
  from /usr/include/c++/3.3.1/locale:47,
  from /usr/include/c++/3.3.1/bits/ostream.tcc:37,
  from /usr/include/c++/3.3.1/ostream:535,
  from /usr/include/c++/3.3.1/iostream:45,
  from newbucket.hxx:44,
  from newbucket.cxx:31:
 /usr/include/c++/3.3.1/limits:205:22: macro min requires 2 arguments,
but
 only 1 given
 In file included from /usr/include/c++/3.3.1/bits/locale_facets.tcc:43,
  from /usr/include/c++/3.3.1/locale:47,
  from /usr/include/c++/3.3.1/bits/ostream.tcc:37,
  from /usr/include/c++/3.3.1/ostream:535,
  from /usr/include/c++/3.3.1/iostream:45,
  from newbucket.hxx:44,
  from newbucket.cxx:31:
 /usr/include/c++/3.3.1/limits:205: error: syntax error before `throw'
 /usr/include/c++/3.3.1/limits:206:22: macro max requires 2 arguments,
but
 only 1 given
 /usr/include/c++/3.3.1/limits:206: error: ISO C++ forbids defining types
 within
return type
 /usr/include/c++/3.3.1/limits:206: error: syntax error before `throw'
 /usr/include/c++/3.3.1/limits:206: error: syntax error before `throw'
 /usr/include/c++/3.3.1/limits:207: error: syntax error before `(' token

 /usr/include/c++/3.1.1/limits is declaring a struct with several
functions,
 two of them named min() and max(), apparently intended to return the
minimum
 and maximum legal values of a given datatype -- from c++/.../limits:

 struct numeric_limits : public __numeric_limits_base
 {
   static _Tp min() throw() { return static_cast_Tp(0); }
   static _Tp max() throw() { return static_cast_Tp(0); }
   static _Tp epsilon() throw() { return static_cast_Tp(0); }
   static _Tp round_error() throw() { return static_cast_Tp(0); }
   static _Tp infinity() throw()  { return static_cast_Tp(0); }
   static _Tp quiet_NaN() throw() { return static_cast_Tp(0); }
   static _Tp signaling_NaN() throw() { return static_cast_Tp(0); }
   static _Tp denorm_min() throw() { return static_cast_Tp(0); }
 };

 I would guess one of the simgear includes is getting loaded before the
chain
 of includes that loads limits, causing this error

 in newbucket.hxx, moving the line
   #include STL_IOSTREAM
 just after compiler.h is included, but before constants.h is included
fixes
 the problem


 ___
 Flightgear-devel mailing list
 [EMAIL PROTECTED]
 http://mail.flightgear.org/mailman/listinfo/flightgear-devel


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel