Bart Vanherck
Fri, 31 Oct 2008 02:44:26 -0700
Karel Gardas wrote:
This error is also present in a recent Ubuntu release, which contains a g++ compiler > 4.3.0EBERSOLD André wrote:I tried to compile mico 2.3.13 on FC9 with gcc 4.3.0 just run configure and than make. I got an error in fast_array.cc Someone knows where the definition UINT_MAX comes from ?
Is just including the limits.h file in fast_array.cc enough? It compiles when I do that, but is that a valid solution ?It comes from either your C++ compiler header files or from the OS header files. It depends. On Solaris I do have it defined in /usr/include/iso/limits_iso.h and also GCC 4.2.3 comes with its own definition in /usr/local/gcc-4.2.3/lib/gcc/i386-pc-solaris2.11/4.2.3/include/limits.h Anyway, GCC team has clean up quite a lot of header files for 4.3.x release so I guess what was included unnecessarily in previous GCC releases is not included now hence the compilation failure. Cheers, Karel
Kind regards Andre E. c++ -I../include -O2 -Wall -Wwrite-strings -fno-strict-aliasing -D_REENTRANT -D_GNU_SOURCE -DPIC -fPIC -c fast_array.cc -o fast_array.pic.o fast_array.cc:51: error: 'UINT_MAX' was not declared in this scope make[1]: *** [fast_array.pic.o] Error 1 make[1]: Leaving directory `/home/...../.../mico/orb' make: *** [system] Error 1 bash-3.2$ grep -r UINT_MAX * orb/fast_array.cc:const unsigned int MICO::__void_array::__EMPTY = UINT_MAX; bash-3.2$ pwd /home/aebersol/Builds/mico bash-3.2$ c++ --version c++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Here is a patch what I did to solve this: --- orb/fast_array.cc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/orb/fast_array.cc b/orb/fast_array.cc index d2c1272..0e621a7 100644 --- a/orb/fast_array.cc +++ b/orb/fast_array.cc @@ -37,6 +37,7 @@ #include <CORBA-SMALL.h> #include <mico/impl.h> +#include <limits.h> #endif // FAST_PCH -- 1.5.6.3 _______________________________________________ Mico-devel mailing list Mico-devel@mico.org http://www.mico.org/mailman/listinfo/mico-devel