What version of WinAPI are you using?  It's there with my version (3.1), I haen't investigated it at all, but I know that MinGW doesn't add the leading underscore to names as often as VC does.  You might want to try something like::

typedef __stat64 _stat64;

I don't actually know if that'll work, but...

Here's the output of a search for __stat64 in the MinGW include directory:

$ grep -r __stat64 /mingw/include/*
/mingw/include/sys/stat.h:struct __stat64
/mingw/include/sys/stat.h:_CRTIMP int __cdecl _fstat64 (int, struct __stat64*);
/mingw/include/sys/stat.h:_CRTIMP int __cdecl _stat64 (const char*, struct __stat64*);
/mingw/include/sys/stat.h:_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);
/mingw/include/wchar.h:struct __stat64
/mingw/include/wchar.h:_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);

-brian

Norman Vine wrote:
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-user-admin@dburns.dhs.org [mailto:osg-user-admin@dburns.dhs.org]
On Behalf Of Norman Vine
Sent: 03 October 2004 11:48
To: osg-user@dburns.dhs.org
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-user@dburns.dhs.org
http://dburns.dhs.org/mailman/listinfo/osg-user


_______________________________________________
osg-user mailing list
osg-user@dburns.dhs.org
http://dburns.dhs.org/mailman/listinfo/osg-user

    


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users