[Dune] dune-grid-howto: compilation error in integration.cc

Christian Engwer christi at uni-hd.de
Tue Mar 30 11:27:39 CEST 2010


On Tue, Mar 30, 2010 at 10:57:21AM +0200, Carsten Gräser wrote:
> Am 30.03.2010 10:31, schrieb Christian Engwer:
> > On Tue, Mar 30, 2010 at 10:15:26AM +0200, Jö Fahlke wrote:
> >> Am Tue, 30. Mar 2010, 09:16:43 +0200 schrieb Benedikt Oswald:
> >>> /Users/oswald/svnwork/dune-trunk/dune-grid/dune/grid/yaspgrid.hh:8:18:
> >>> error: cstdint: No such file or directory
> >>
> >> I think the problem is the #include <cstdint> instroduced in dune-grid r6545
> >> by chriti.  I cannot find the header cstdint in the standard, so that commit
> >> was probably wrong.  Christi, can you please have a look?
> > 
> > OK, I checked... the include was necessary to use the uint8_t. Sadly
> > this header is only part of C++0x. Can anybody tell me what is the
> > correct way of using fixed bit-with integral types? Would the stdint.h
> > header (part of C99) be a viable solution?
> > 
> > Opinions?
> While <stdint.h> is only part of C99 but not of ISO C++ the
> tr1 extension defines <stdint.h> and <cstdint>. The later
> puts the types in the std:: namespace <stdint.h> provides them
> in the global  namespace (like C99).
> 
> If we want to realy on plain ISO C++ without extensions the
> answer is simple: Don't use any of those headers or reimplement it.

We have to find a way in the middle. Reimplementing everything doesn't
seem a good solution. We had too much trouble already.

If enough systems provide stdint.h, I'd suggest to just use it.

Benedikt, is stdint.h available on the machine in question?

Christian




More information about the Dune mailing list