Hi,<div><br></div><div>By looking a little more, i see that the options "CMAKE_USE_WIN32_THREADS" and "CMAKE_USE_PTHREADS" was checked in the configuration. </div><div><br></div><div>Now it's ok and compile !</div>
<div><br></div><div>Thanks</div><div><br></div><div>Vince</div><div><br><div class="gmail_quote">On Mon, Dec 28, 2009 at 18:33, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Luis,<br>
<br>
I'm not sure we have a mingw build with gcc 4.4?<br>
<br>
Bill<br>
<div><div></div><div class="h5"><br>
On Mon, Dec 28, 2009 at 12:22 PM, Vincent LEFORT<br>
<<a href="mailto:vincent.lefort@gmail.com">vincent.lefort@gmail.com</a>> wrote:<br>
> Hello, i've the same problem. I can't compile ITK with mingw and gcc 4.4 on<br>
> windows.<br>
><br>
> I haven't enabled pthread (only check BUILD_EXAMPLES, BUILD_SHARED_LIBS,<br>
> BUILD_TESTING with cmake-gui).<br>
><br>
> Thanks for the help.<br>
><br>
> Regards.<br>
><br>
> Vincent<br>
><br>
> ############## Error : ###############<br>
><br>
> [ 45%] Building CXX object<br>
> Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj<br>
><br>
> In file included from<br>
> E:\lib\InsightToolkit-3.16.0\Code\Common\/itkConditionVariable.h:31,<br>
> from<br>
> E:\lib\InsightToolkit-3.16.0\Code\Common\/itkBarrier.h:21,<br>
> from<br>
> E:\lib\InsightToolkit-3.16.0\Code\Common\itkBarrier.cxx:17:<br>
> E:\lib\InsightToolkit-3.16.0\Code\Common\/itkMutexLock.h:50: error:<br>
> conflicting declaration 'typedef void* itk::MutexType'<br>
> E:\lib\InsightToolkit-3.16.0\Code\Common\/itkMutexLock.h:46: error:<br>
> 'itk::MutexType' has a previous declaration as 'typedef struct<br>
> pthread_mutex_t_* itk::MutexType'<br>
> mingw32-make[2]: *** [Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj]<br>
> Error 1<br>
> mingw32-make[1]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2<br>
> mingw32-make: *** [all] Error 2<br>
><br>
> #####<br>
><br>
> Hi 张宁,<br>
><br>
><br>
> We build ITK every Night with MinGW.<br>
><br>
><br>
> Please see the builds on:<br>
><br>
> dash14.kitware Win32-mingw<br>
><br>
> <a href="http://www.cdash.org/CDash/index.php?project=Insight&date=2009-07-09" target="_blank">http://www.cdash.org/CDash/index.php?project=Insight&date=2009-07-09</a><br>
><br>
><br>
> Did you explicitly enabled pthreads ?<br>
><br>
><br>
> Our Nightly build *does not* use pthreads.<br>
><br>
><br>
> Please see its CMakeCache.txt file here:<br>
> <a href="http://www.cdash.org/CDash/testDetails.php?test=26927876&build=374501" target="_blank">http://www.cdash.org/CDash/testDetails.php?test=26927876&build=374501</a><br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
> --------------<br>
> 张宁 wrote:<br>
>> Hello! I tried to compile the latest cvs ITK with mingw with the<br>
>> makefile generated by cmake. The compiler complained the following errors.<br>
>> [ 66%] Building CXX object<br>
>> Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj<br>
>> In file included from<br>
>> F:\ITK\source\Insight\Code\Common\itkConditionVariable.h:31,<br>
>> from F:\ITK\source\Insight\Code\Common\itkBarrier.h:21,<br>
>> from F:\ITK\source\Insight\Code\Common\itkBarrier.cxx:17:<br>
>> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: conflicting<br>
>> declaration 'typedef void*itk::MutexType'<br>
>> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error:<br>
>> 'itk::MutexType' has a previous declaration as `typedef struct<br>
>> pthread_mutex_t_*itk::MutexType'<br>
>> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration<br>
>> of `typedef void*itk::MutexType'<br>
>> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts<br>
>> with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType'<br>
>> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration<br>
>> of `typedef void*itk::MutexType'<br>
>> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts<br>
>> with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType'<br>
>> mingw32-make[4]: ***<br>
>> [Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj] Error 1<br>
>> mingw32-make[3]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2<br>
>> mingw32-make[2]: *** [all] Error 2<br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</blockquote></div><br></div>