Error in serializerIO.hh?


I tried to rebuild the full source code (V5 Release 1) in DEBUG mode and got the following error:

Compile vtkDataOutput.cpp
g++ -g -DOLB_DEBUG -I…/…/src -c vtkDataOutput.cpp -o …/…/build/generic/obj/vtkDataOutput.o
In file included from vtkDataOutput.cpp:29:
serializerIO.hh: In function void olb::serializer2ostr(const olb::DataSerializer<T>&, std::ostream*, bool)': serializerIO.hh:45: error:numeric_limits’ undeclared (first use this function)

However, it seems to work fine when line 45

        OLB_PRECONDITION(binarySize <= numeric_limits<unsigned int>::max());

is replaced by

        OLB_PRECONDITION(binarySize <= std::numeric_limits<unsigned int>::max());

Is this the correct fix? Is this error system-dependent? Are there similar problems known?
(I use the CygWin g++ compiler and gdb debugger together with Eclipse CDT on a Windows Vista System. )

Dear smeier,

Just add
using namespace std;
in the beginning of your main.cpp and in the serializerIO.hh

This error occured with different types of gcc - some of them by default recognize std prefix, some not.

Hopefully it will help,

Dear Alex,

Thank you, this helps!