From: Norman V. <nh...@ca...> - 2004-10-03 12:28:53
|
Gordon Tomlinson writes: > > On Windozes you have to use _stat64 > > E.g. > > #include <sys/types.h> > #include <sys/stat.h> > > struct __stat64 statbuf; > > if ( _stat64( fileName, &statbuf ) == 0 ) > return statbuf.st_size; That seems to work with VC6 sp6 but does not work with MINGW grrrr .... ../FileUtils.cpp: In function `bool osgDB::makeDirectory(const std::string&)': ../FileUtils.cpp:66: error: `_stat64' undeclared (first use this function) I will investigate further as I *much* prefer being able to use gcc. Thanks Norman > > -----Original Message----- > From: osg...@db... [mailto:osg...@db...] > On Behalf Of Norman Vine > Sent: 03 October 2004 11:48 > To: osg...@db... > Subject: RE: [osg-user]Problems with GDAL supported textures and osgdem. > > Robert Osfield writes: > >> > > I've changed the FilUtils.cpp code across to use stat64, it compiles > > ok under Linux, fingers crossed it'll servived the cross platform > > build. This change is now checked in. > > I don't think this will work on Windows .. > unless one is running Cygwin > > GDAL wiggles around this issue in these files gdal / port / cpl_vsi.h gdal / > port / cpl_vsil_XXX.cpp > > HTH > > Norman > > $ gcc --version > gcc.exe (GCC) 3.4.2 (mingw-special) > > ../FileUtils.cpp: In function `bool osgDB::makeDirectory(const > std::string&)': > ../FileUtils.cpp:65: error: aggregate `stat64 stbuf' has incomplete type and > cannot be defined > ../FileUtils.cpp:66: error: invalid use of undefined type `struct stat64' > ../FileUtils.cpp:65: error: forward declaration of `struct stat64' > ../FileUtils.cpp:85: error: invalid use of undefined type `struct stat64' > ../FileUtils.cpp:65: error: forward declaration of `struct stat64' > ../FileUtils.cpp: In function `osgDB::FileType osgDB::fileType(const > std::string&)': > ../FileUtils.cpp:151: error: aggregate `stat64 fileStat' has incomplete type > and cannot be defined > ../FileUtils.cpp:152: error: invalid use of undefined type `struct stat64' > ../FileUtils.cpp:151: error: forward declaration of `struct stat64' > ../FileUtils.cpp: At global scope: > ../FileUtils.cpp:166: warning: unused parameter 'caseSensitivity' > make[3]: *** [FileUtils.o] Error 1 > > > _______________________________________________ > osg-user mailing list > osg...@db... > http://dburns.dhs.org/mailman/listinfo/osg-user > > > _______________________________________________ > osg-user mailing list > osg...@db... > http://dburns.dhs.org/mailman/listinfo/osg-user > |