<div class="gmail_quote"><span style="font-family:&#39;Times New Roman&#39;;font-size:medium"><pre>Hello, i&#39;ve the same problem. I can&#39;t compile ITK with mingw and gcc 4.4 on windows.</pre><pre>I haven&#39;t enabled pthread (only check BUILD_EXAMPLES, BUILD_SHARED_LIBS, BUILD_TESTING with cmake-gui).</pre>


<pre>Thanks for the help.</pre><pre>Regards.</pre><pre>Vincent</pre><pre><br></pre><pre>############## Error : ###############</pre><pre>[ 45%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj</pre>


<pre>In file included from E:\lib\InsightToolkit-3.16.0\Code\Common\/itkConditionVariable.h:31,
                 from E:\lib\InsightToolkit-3.16.0\Code\Common\/itkBarrier.h:21,
                 from E:\lib\InsightToolkit-3.16.0\Code\Common\itkBarrier.cxx:17:
E:\lib\InsightToolkit-3.16.0\Code\Common\/itkMutexLock.h:50: error: conflicting declaration &#39;typedef void* itk::MutexType&#39;
E:\lib\InsightToolkit-3.16.0\Code\Common\/itkMutexLock.h:46: error: &#39;itk::MutexType&#39; has a previous declaration as &#39;typedef struct pthread_mutex_t_* itk::MutexType&#39;
mingw32-make[2]: *** [Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj] Error 1
mingw32-make[1]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2
mingw32-make: *** [all] Error 2</pre><pre>#####</pre><pre>Hi 张宁,


We build ITK every Night with MinGW.


Please see the builds on:

      dash14.kitware      Win32-mingw

<a href="http://www.cdash.org/CDash/index.php?project=Insight&amp;date=2009-07-09" target="_blank">http://www.cdash.org/CDash/index.php?project=Insight&amp;date=2009-07-09</a>


Did you explicitly enabled pthreads ?


Our Nightly build *does not* use pthreads.


Please see its CMakeCache.txt file here:
<a href="http://www.cdash.org/CDash/testDetails.php?test=26927876&amp;build=374501" target="_blank">http://www.cdash.org/CDash/testDetails.php?test=26927876&amp;build=374501</a>



     Regards,


         Luis


--------------
张宁 wrote:
&gt;<i> Hello! I tried to compile the latest cvs ITK with mingw with the 
</i>&gt;<i> makefile generated by cmake. The compiler complained the following errors.
</i>&gt;<i> [ 66%] Building CXX object 
</i>&gt;<i> Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj
</i>&gt;<i> In file included from 
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkConditionVariable.h:31,
</i>&gt;<i>                  from F:\ITK\source\Insight\Code\Common\itkBarrier.h:21,
</i>&gt;<i>                  from F:\ITK\source\Insight\Code\Common\itkBarrier.cxx:17:
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: conflicting 
</i>&gt;<i> declaration &#39;typedef void*itk::MutexType&#39;
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: 
</i>&gt;<i> &#39;itk::MutexType&#39; has a previous declaration as `typedef struct 
</i>&gt;<i> pthread_mutex_t_*itk::MutexType&#39;
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration 
</i>&gt;<i> of `typedef void*itk::MutexType&#39;
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts 
</i>&gt;<i> with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType&#39;
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration 
</i>&gt;<i> of `typedef void*itk::MutexType&#39;
</i>&gt;<i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts 
</i>&gt;<i> with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType&#39;
</i>&gt;<i> mingw32-make[4]: *** 
</i>&gt;<i> [Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj] Error 1
</i>&gt;<i> mingw32-make[3]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2
</i>&gt;<i> mingw32-make[2]: *** [all] Error 2</i></pre></span>
</div><br>