thanks Philip Lowman!
 i will try it!

 
 

在2008-07-29,"Philip Lowman" <[EMAIL PROTECTED]> 写道:

On Tue, Jul 29, 2008 at 1:00 AM, songbo_1220 <[EMAIL PROTECTED]> wrote:

hello everyone!
sorry my english is poor.
i working at the mingw, i make the osg, find below some error, can you tell me 
why and how to do?
thanks!
[EMAIL PROTECTED] 
/f/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/build_msys
$ make
Scanning dependencies of target OpenThreads
[  0%] Building CXX object 
src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/WIN32Condition.obj
In file included from 
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32ConditionPrivateData.h:29,
                 from 
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/WIN32Condition.cpp:20:
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32ThreadPrivateData.h:22:1:
 warning: "_WIN32_WINNT" redefined
In file included from 
f:\mingw\build\bin\../lib/gcc/i386-pc-mingw32/4.3.0/../../../../include/windows.h:48,
                 from 
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32ConditionPrivateData.h:24,
                 from 
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/WIN32Condition.cpp:20:
f:\mingw\build\bin\../lib/gcc/i386-pc-mingw32/4.3.0/../../../../include/windef.h:20:1:
 warning: this is the location of the previous definition
[  0%] Building CXX object 
src/OpenThreads/win32/CMakeFiles/OpenThreadsdir/Win32Mutex.obj
[  0%] Building CXX object 
src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/Win32Thread.obj
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32Thread.cpp:
 In static member function 'static int 
OpenThreads::ThreadPrivateActions::SetThreadSchedulingParams(OpenThreads::Thread*)':
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32Thread.cpp:196:
 error: 'getenv' was not declared in this scope
make[2]: *** [src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/Win32Thread.obj] 
Error 1
make[1]: *** [src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/all] Error 2
make: *** [all] Error 2

Songbo,

Looks like a bug.  To workaround the problem on your system, add the following 
to Win32Thread.cpp, near the top:
#include <stdlib.h>



osg-submissions,

I can't reproduce the compilation error with my MinGW and the latest OSG trunk 
but I'm attaching the fix anyways since <stdlib.h> should be #included in this 
source file anyways.  I can reproduce the warning due to the redefinition of 
_WIN32_WINNT and I've fixed it.

-- 
Philip Lowman
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to