I was just looking at that and here is the block of code in question: /* Define the ssize_t type if it not is defined */ #if H5_SIZEOF_SSIZE_T==0 /* Undefine this size, we will re-define it in one of the sections below */ #undef H5_SIZEOF_SSIZE_T #if H5_SIZEOF_SIZE_T==H5_SIZEOF_INT typedef int ssize_t; # define H5_SIZEOF_SSIZE_T H5_SIZEOF_INT #elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG typedef long ssize_t; # define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG #elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG_LONG typedef long long ssize_t; # define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG_LONG #else /* Can't find matching type for ssize_t */ # error "nothing appropriate for ssize_t" #endif #endif
The question is why is H5_SIZEOF_SSIZE_T getting set to 0 on MinGW? Does the test fail for some reason on MinGW? rogez: How did you get the HDF5 library that you are using? Did you compile it yourself? If so how did you "configure" the HDF5 source? With CMake or with the ./configure? Thanks ___________________________________________________________ Mike Jackson Principal Software Engineer BlueQuartz Software Dayton, Ohio [email protected] www.bluequartz.net On Oct 4, 2011, at 11:57 AM, Peter Cao wrote: > Try the following to see if it works: > > Set #define H5_SIZEOF_SSIZE_T to 1 at H5pubconf.h > > --pc > > On 10/4/2011 10:43 AM, rogez wrote: >> Hi, >> >> I was using HDF5 API on Visual Studio C++ and it worked fine. >> I now try to compile a new tutorial project under Eclipse/MinGW and I get >> the following issue : >> >> /HDF5/1.8.7/include/H5public.h:133:13: error: conflicting declaration >> 'typedef int ssize_t' >> lib/gcc/mingw32/4.5.2/../../../../include/sys/types.h:118:18: error: >> 'ssize_t' has a previous declaration as 'typedef _ssize_t ssize_t'/ >> >> Do you know if there's a mean to configure HDF5 or Eclipse/MinGW to work >> together ? >> >> Thanks, >> >> Yves >> >> -- >> View this message in context: >> http://hdf-forum.184993.n3.nabble.com/HDF5-and-MinGW-tp3393676p3393676.html >> Sent from the hdf-forum mailing list archive at Nabble.com. >> >> _______________________________________________ >> Hdf-forum is for HDF software users discussion. >> [email protected] >> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org >> > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
