[Insight-users] The itk could not compiled with mingw

Vincent LEFORT vincent.lefort at gmail.com
Mon Dec 28 12:22:47 EST 2009


Hello, i've the same problem. I can't compile ITK with mingw and gcc
4.4 on windows.

I haven't enabled pthread (only check BUILD_EXAMPLES,
BUILD_SHARED_LIBS, BUILD_TESTING with cmake-gui).

Thanks for the help.

Regards.

Vincent


############## Error : ###############

[ 45%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj

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

#####

Hi 张宁,


We build ITK every Night with MinGW.


Please see the builds on:

      dash14.kitware      Win32-mingw
http://www.cdash.org/CDash/index.php?project=Insight&date=2009-07-09


Did you explicitly enabled pthreads ?


Our Nightly build *does not* use pthreads.


Please see its CMakeCache.txt file
here:http://www.cdash.org/CDash/testDetails.php?test=26927876&build=374501



     Regards,


         Luis


--------------
张宁 wrote:
>* Hello! I tried to compile the latest cvs ITK with mingw with the *>* makefile generated by cmake. The compiler complained the following errors.*>* [ 66%] Building CXX object *>* Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj*>* In file included from *>* F:\ITK\source\Insight\Code\Common\itkConditionVariable.h:31,*>*                  from F:\ITK\source\Insight\Code\Common\itkBarrier.h:21,*>*                  from F:\ITK\source\Insight\Code\Common\itkBarrier.cxx:17:*>* F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: conflicting *>* declaration 'typedef void*itk::MutexType'*>* F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: *>* 'itk::MutexType' has a previous declaration as `typedef struct *>* pthread_mutex_t_*itk::MutexType'*>* F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration *>* of `typedef void*itk::MutexType'*>* F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts *>* with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType'*>* F:\ITK\source\Insight\Code\Common\itkMutexLock.h:50: error: declaration *>* of `typedef void*itk::MutexType'*>* F:\ITK\source\Insight\Code\Common\itkMutexLock.h:46: error: conflicts *>* with previous declaration `typedef struct pthread_mutex_t_*itk::MutexType'*>* mingw32-make[4]: *** *>* [Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.obj] Error 1*>* mingw32-make[3]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2*>* mingw32-make[2]: *** [all] Error 2*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091228/584ee848/attachment.htm>


More information about the Insight-users mailing list