Re: [TuxKart-users] I have a compilation problem(corection)
Status: Alpha
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-07-05 22:16:41
|
al wrote: > > Mandrake 7.1 > Glide_V3-2.60.15-3mdk.rpm & devel rpm > Mesa3.2(compiled from source) > plib-1.2.0-i586.rpm (NOT source) > freeglut-alpha-1.3(source) > VooDoo3 1000 AGP ... > /usr/include/plib/sg.h:842: `FLT_MAX' undeclared (first use this > function) SHORT ANSWER: Well, I'm guessing that the short answer is to hack in: #include <float.h> ...into PLIB's src/sg.h, to re-build and re-install PLIB, and then to try again...but that doesn't compile on my Linux box. LONG ANSWER: OK - I'm officially confused. 1) I always used to use 'math.h' which defined FLT_MAX. /usr/include/math.h *uses* FLT_MAX - so that ought to be OK. 2) That stopped working in a recent release - because it's actually defined in 'float.h' which has ceased to exist (at least under SuSE Linux 6.4). 3) At the top of 'values.h' it says: /* This interface is obsolete. New programs should use <limits.h> and/or <float.h> instead of <values.h>. */ ...but float.h has 'gone away' and 'limits.h' doesn't define it either. 4) At the end of 'limits.h', it says this: #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ # include_next <limits.h> #endif What the heck is '#include_next' ??!? Aaaarrrggghhhhh!!!! Anyway, somehow (despite FLT_MAX not being defined in ANY header file I can find), my code compiles without <float.h> ... I suspect that these tokens are perhaps hard-coded into the C/C++ compiler so that cross-compilation can work or something like that. Does *anyone* have a clue? -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |