On Wed, Feb 27, 2008 at 12:46 PM, Wiedemann, Rudolf, OPS3 <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> when compiling OSG on WindowsXP with MinGW-5.1.3 I get the following
> error:
>  osgDB\FileNameUtils.cpp: In function `std::string
> osgDB::getRealPath(const std::string&)':
>  osgDB\FileNameUtils.cpp:254: error: `GetLongPathName' was not declared
> in this scope
>  osgDB\FileNameUtils.cpp:264: error: `GetLongPathName' was not declared
> in this scope
>
> Does anyone have an idea?


#define _WIN32_WINNT 0x0500
Needs to be added to the source file right before it calls #include <
windows.h>.  I'll submit this to osg-submissions to make sure it gets fixed.

The reason for this issue is that when one compiles with MinGW (as opposed
to MSVC) one needs to #define _WIN32_WINNT properly.  The MinGW header files
enforce the _WIN32_WINNT preprocessor definition for anything added to the
Windows API after Windows 95.  The Microsoft Platform SDK (at least the
Windows 2003 Server release), on the other hand, does not appear to require
you to #define anything to use OS functions introduced with Windows 2000.


Using GetLongPathName() requires Windows 2000 or greater on the target
platform running OSG. A cursory examination of the OSG code base reveals no
additional dependency on Windows 2000 that I can see, so I just wanted to
bring this to everyone's attention in case it's cause for concern.


-- 
Philip Lowman
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to