golla Minoli said:

> I'm new to flightgear, though I allways wanted to play
> it. Nearly the first thing I did on my new compu, was
> to try to compile FG. Unluckyly I ran into three
> problems.
> First one is with the file
> "src/FDM/JSBSim/FGJSBBase.h". It requires
> "numeric_limits" included for limits.h. This is only
> implemented in a newer version of stdc++, which I
> sadly don't have. So I would have to find out the
> smallest possible change of a double and float
> variable.
> The second problem is that the Makefile in src/Network
> would like to compile a jpg-httpd.cxx. I could remove
> that from that makefile and also the missing
> src/Network/jpg-httpd.hxx from the makefile in
> src/Main and it would compile, though I dont know if
> it would be missed later on.
> My last problem was a missing file fg_os.cxx in
> /src/Main. Again I tried to replace it with
> fg_os_sdl.cxx.From the name of that file I guessed
> that this would be a bad idead, as I would like opengl
> and not sdl.
> Thanks a lot, 
> Stefan

Ummm...hmmm...anyone read this yet (first preview feedback)?  This issue has
been fixed in JSBSim and needs to be rolled into FlightGear at some point. 
Perhaps this one fix should be added to FlightGear anyway before the next preview.

Meanwhile, below is the patch as found in JSBSim CVS:

Stefan,  you can apply the patch to your source if you want.



Index: FGJSBBase.h
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/FDM/JSBSim/FGJSBBase.h,v
retrieving revision 1.15
diff -u -r1.15 FGJSBBase.h
--- FGJSBBase.h 27 Jun 2004 19:35:54 -0000      1.15
+++ FGJSBBase.h 20 Jul 2004 17:28:14 -0000
@@ -38,7 +38,7 @@

-#include <limits>
+#include <float.h>

 #ifdef FGFS
 #  include <simgear/compiler.h>
@@ -204,7 +204,7 @@
       @param b second value to compare
       @return if the two values can be considered equal up to roundoff */
   static bool EqualToRoundoff(double a, double b) {
-    double eps = 2.0*std::numeric_limits<double>::epsilon();
+    double eps = 2.0*DBL_EPSILON;
     return fabs(a - b) <= eps*max(fabs(a), fabs(b));

@@ -213,7 +213,7 @@
       @param b second value to compare
       @return if the two values can be considered equal up to roundoff */
   static bool EqualToRoundoff(float a, float b) {
-    float eps = 2.0*std::numeric_limits<float>::epsilon();
+    float eps = 2.0*FLT_EPSILON;
     return fabs(a - b) <= eps*max(fabs(a), fabs(b));

Flightgear-devel mailing list

Reply via email to