<div class="gmail_quote"><span style="font-family:'Times New Roman';font-size:medium"><pre>Hello, i've the same problem. I can't compile ITK with mingw and gcc 4.4 on windows.</pre><pre>I haven'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 'typedef void* itk::MutexType'
E:\lib\InsightToolkit-3.16.0\Code\Common\/itkMutexLock.h:46: error: 'itk::MutexType' has a previous declaration as 'typedef struct pthread_mutex_t_* itk::MutexType'
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&date=2009-07-09" target="_blank">http://www.cdash.org/CDash/index.php?project=Insight&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&build=374501" target="_blank">http://www.cdash.org/CDash/testDetails.php?test=26927876&build=374501</a>
Regards,
Luis
--------------
张宁 wrote:
><i> Hello! I tried to compile the latest cvs ITK with mingw with the
</i>><i> makefile generated by cmake. The compiler complained the following errors.
</i>><i> [ 66%] Building CXX object
</i>><i> Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj
</i>><i> In file included from
</i>><i> F:\ITK\source\Insight\Code\Common\itkConditionVariable.h:31,
</i>><i> from F:\ITK\source\Insight\Code\Common\itkBarrier.h:21,
</i>><i> from F:\ITK\source\Insight\Code\Common\itkBarrier.cxx:17:
</i>><i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: conflicting
</i>><i> declaration 'typedef void*itk::MutexType'
</i>><i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error:
</i>><i> 'itk::MutexType' has a previous declaration as `typedef struct
</i>><i> pthread_mutex_t_*itk::MutexType'
</i>><i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration
</i>><i> of `typedef void*itk::MutexType'
</i>><i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts
</i>><i> with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType'
</i>><i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration
</i>><i> of `typedef void*itk::MutexType'
</i>><i> F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts
</i>><i> with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType'
</i>><i> mingw32-make[4]: ***
</i>><i> [Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj] Error 1
</i>><i> mingw32-make[3]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2
</i>><i> mingw32-make[2]: *** [all] Error 2</i></pre></span>
</div><br>