Basically, we need to ensure that the stdint.h types are provided regardless of that header being supported (as it's a C99 header and we're still only *requiring* C90 compliance). So right now, the inclusion of that header was set to key off of symbols that stdint.h provides or the HAVE_STDINT_H define, which our configure sets after testing for the existence of the stdint.h header.
So in your code situation as an external code, the configure test never ran and stdint.h obviously wasn't included before brlcad.h -- which would have been the other quick-fix in leu of setting HAVE_STDINT_H. I'm open to suggestions, but I'm thinking the best route forward is to reverse the logic and assume stdint.h is available unless someone sets an override to get compatibility. Of course, the pstdint.h header could also be fixed so that the types are not conflicting -- that should work too. Cheers! Sean On Tuesday, April 20, 2010, at 04:42PM, "Tom Browder" <[email protected]> wrote: >Can't explain why, but now--while using my new gcc-4.5.0, I'm getting >an error during compilation of an app using brlcad (the trunk >version): > >It looks like > >In file included from /usr/include/stdlib.h:320:0, > from /usr/brlcad/include/brlcad/bu.h:48, > from /usr/brlcad/include/brlcad/vmath.h:85, > from g2xml_brlcad_funcs.h:11, > from g2xml_brlcad_funcs.cpp:26: >/usr/include/sys/types.h:198:1: error: conflicting declaration typedef >long int int64_t >/usr/brlcad/include/brlcad/pstdint.h:456:36: error: int64_t has a >previous declaration as typedef long long int int64_t > >I have temporarily squashed it by adding the following define to my >compile lines: > > -DHAVE_STDINT_H > >I am using "brlcad.h' and not using any other brlcad headers. > >Note the app is a Qt one and uses the qmake system. There may be a >g++-4.5.0 thing I have to sort out; however, looking at the common.h >which is included by brlcad.h I see near the top after brlcad_config.h >is NOT included: > >#if !defined(INT8_MAX) || !defined(INT16_MAX) || !defined(INT32_MAX) >|| !defined(INT64_MAX) ># ifdef HAVE_STDINT_H ># define __STDC_LIMIT_MACROS 1 ># define __STDC_CONSTANT_MACROS 1 ># include <stdint.h> ># else ># include "pstdint.h" ># endif >#endif > >I don't know where HAVE_STDINT_H is supposed to be defined in a >non-gnu application. I'm still looking into Qt, though. > >Any ideas appreciated. > >-Tom > >Thomas M. Browder, Jr. >Niceville, Florida >USA > >------------------------------------------------------------------------------ >_______________________________________________ >BRL-CAD Developer mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/brlcad-devel > > ------------------------------------------------------------------------------ _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
