Hi Hongzhi, how are you building these external libraries? It is important to use the same build configuration like it is done in the superbuild. Are you passing the related source files to the superbuild or do you build them separately and then pass the build directories to the MITK build.
Please note also that with MITK 2015.05.2 we already use ITK 4.7.1 What MITK version are you using? Regards, Andreas Von: Hongzhi Lan <hong...@stanford.edu<mailto:hong...@stanford.edu>> Datum: Friday 27 November 2015 04:29 An: "mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>" <mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>> Betreff: [mitk-users] MITK build using external ITK Hi, I used MITK superbuild, which was very convenient. Now I'm trying to build MITK with some external such as VTK6.2.0, ITK4.7.1, CTK ect , but there are some issues. Those issues never happened in the superbuild. Can I get some help to deal with these issues? VTK ITK source code is from MITK website. I use Ubuntu 14.04 and gcc 4.8.4. Thanks! Hongzhi 1. First error is as below: -------------------------------------------------------------- In file included from /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h:250:0, from /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_limits.h:5, from /home/hongzhi/SourceCode/From_MITK/ITK/Modules/Core/Common/include/itkNumericTraits.h:45, from /home/hongzhi/SourceCode/From_MITK/ITK/Modules/Core/Common/include/itkVectorContainer.hxx:22, from /home/hongzhi/SourceCode/From_MITK/ITK/Modules/Core/Common/include/itkVectorContainer.h:358, from /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkDataStorage.h:24, from /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkBaseRenderer.h:20, from /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkMapper.h:22, from /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/include/mitkCoreObjectFactoryBase.h:27, from /home/hongzhi/SourceCode/MITK-2015.05.2/Modules/Core/src/mitkCoreObjectFactoryBase.cpp:17: /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:387:27: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::zero’ of non-integral type [-fpermissive] static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:389:26: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::one’ of non-integral type [-fpermissive] static const float one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0F); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:391:29: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::maxval’ of non-integral type [-fpermissive] static const float maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(3.40282346638528860e+38F); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:410:28: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double vnl_numeric_traits<double>::zero’ of non-integral type [-fpermissive] static const double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:412:27: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double vnl_numeric_traits<double>::one’ of non-integral type [-fpermissive] static const double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:414:30: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double vnl_numeric_traits<double>::maxval’ of non-integral type [-fpermissive] static const double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:433:33: error: ‘constexpr’ needed for in-class initialization of static data member ‘const long double vnl_numeric_traits<long double>::zero’ of non-integral type [-fpermissive] static const long double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:435:32: error: ‘constexpr’ needed for in-class initialization of static data member ‘const long double vnl_numeric_traits<long double>::one’ of non-integral type [-fpermissive] static const long double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0); ^ /home/hongzhi/SourceCode/From_MITK/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:437:35: error: ‘constexpr’ needed for in-class initialization of static data member ‘const long double vnl_numeric_traits<long double>::maxval’ of non-integral type [-fpermissive] static const long double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308); 2. If the external ITK has vtkglue, the second error appears: ------------------------------------------------------------------------------- <command-line>:0:0: error: "vtkRenderingCore_AUTOINIT" redefined [-Werror] <command-line>:0:0: note: this is the location of the previous definition I found MITKCore privately use/link all ITK modules, which include ITKVtkGlue. Someone already mentioned in mailing list, but no solution provided. MITK-build/Modules/Core/CMakeFiles/MitkCore.dir/DependInfo.cmake includes: "vtkRenderingCore_AUTOINIT=3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" "vtkRenderingCore_AUTOINIT=4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)" //from I believe the first is from ITKVtkglue, the second is from VTK. I wonder how to solve this conflict. ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users