[osg-users] osg make error in mingw
songbo_1220 at 163.com
Tue Jul 29 02:51:25 PDT 2008
thanks Philip Lowman!
i will try it!
在2008-07-29，"Philip Lowman" <philip at yhbt.com> 写道：
On Tue, Jul 29, 2008 at 1:00 AM, songbo_1220 <songbo_1220 at 163.com> wrote:
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?
Administrator at 2F1ABC2403DE47B /f/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/build_msys
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,
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,
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: *** [src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/Win32Thread.obj] Error 1
make: *** [src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/all] Error 2
make: *** [all] Error 2
Looks like a bug. To workaround the problem on your system, add the following to Win32Thread.cpp, near the top:
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users