<div> thanks Philip Lowman!<br> i will try it!<br></div><div> </div><div> </div><div></div><br>ÔÚ2008-07-29£¬"Philip Lowman" <philip@yhbt.com> дµÀ£º<br> <blockquote id="isReplyContent" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div dir="ltr">On Tue, Jul 29, 2008 at 1:00 AM, songbo_1220 <span dir="ltr"><<a href="mailto:songbo_1220@163.com" target="_blank">songbo_1220@163.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hello everyone!<br>sorry my english is poor.<br>i working at the mingw, i make the osg, find below some error, can you tell me why and how to do?<br>thanks!<br>Administrator@2F1ABC2403DE47B /f/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/build_msys<br>
$ make<br>Scanning dependencies of target OpenThreads<br>[ 0%] Building CXX object src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/WIN32Condition.obj<br>In file included from f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32ConditionPrivateData.h:29,<br>
from f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/WIN32Condition.cpp:20:<br>f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32ThreadPrivateData.h:22:1: warning: "_WIN32_WINNT" redefined<br>
In file included from f:\mingw\build\bin\../lib/gcc/i386-pc-mingw32/4.3.0/../../../../include/windows.h:48,<br> from f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32ConditionPrivateData.h:24,<br>
from f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/WIN32Condition.cpp:20:<br>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<br>
[ 0%] Building CXX object src/OpenThreads/win32/CMakeFiles/OpenThreadsdir/Win32Mutex.obj<br>[ 0%] Building CXX object src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/Win32Thread.obj<br>f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32Thread.cpp: In static member function 'static int OpenThreads::ThreadPrivateActions::SetThreadSchedulingParams(OpenThreads::Thread*)':<br>
f:/OpenSceneGraph/OpenSceneGraph-2.2.0/OpenSceneGraph/src/OpenThreads/win32/Win32Thread.cpp:196: error: 'getenv' was not declared in this scope<br>make[2]: *** [src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/Win32Thread.obj] Error 1<br>
make[1]: *** [src/OpenThreads/win32/CMakeFiles/OpenThreads.dir/all] Error 2<br>make: *** [all] Error 2</blockquote><div><br>Songbo,<br><br>Looks like a bug. To workaround the problem on your system, add the following to Win32Thread.cpp, near the top:<br>
#include <stdlib.h><br>
</div></div><br><br>osg-submissions,<br><br>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.<br>
<br>-- <br>Philip Lowman<br>
</div>
</blockquote>