6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> D:\Project\SimpleITK\Code\Common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkBSplineTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkDisplacementFieldTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkScaleVersor3DTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> Generating Code...
6>Done building project "SimpleITK.vcxproj" -- FAILED.
12>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
12>Project not selected to build for this solution configuration
========== Build: 5 succeeded, 1 failed, 2 up-to-date, 6 skipped ==========
These rocks have huge impact when is found a special combination: to be a beginner like me and time is running out, just like my combination :))
The compilation errors you are receiving is because you are compiled a version of SimpleITK that worked with ITKv4 and does not support the changes in ITKv5. Those changes are currently in the SimpleITK master branch, and the next release will support the stabalized ITK 5.1.
In the linked instructions, it strongly suggests using SimpleITK’s Superbuild, which automatically builds the proper version of ITK ( and other requirements ).
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkSimilarity2DTransform.cxx
6> Generating Code...
6>Done building project "SimpleITK.vcxproj" -- FAILED.
12>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
12>Project not selected to build for this solution configuration
========== Build: 5 succeeded, 1 failed, 2 up-to-date, 6 skipped ==========
I was thinking that will be perfect if there will be available SimpleITK libraries already compiled, just like in Python case, or C# … it is frustrating to spent days to compile SimpleITK library (debug version by now) … and not succeeded …
Because I have compiled the previous time as MD, not MT, and for my real project I need MT, I erased all, and I have compiled again. With this outcome. I have used the same settings.
E.g. /MDd /Zi /Ob0 /Od /RTC1 to /MTd /Zi /Ob0 /Od /RTC1 on CMake CMAKE_CXX_FLAGS_DEBUG
As I said, I erase all and do it again … that is all. And after I delete it all, I’ve taken the code from official site. Not worked … and seem that github version is not working anymore …
All libraries must be compiled with /MTd for the final project to be able to be compiled with /MTd. I am not sure whether super-builds propagate CMAKE_CXX_FLAGS to internal projects (I think they don’t).
I was able to successfully build SimpleITK on a windows WM following your instructions using CMake 3.14.1 and an updated Visual Studio 2017 professional.
In the configuration log I see you are using Visual Studio 2017 Community edition. I am wondering if that compiler is old and has a bug causing your compilation error. There is a newer Visual Studio Community 2019.
Other than that my only thought is that you some how have a dirty directory around in your build environment that you some how are using by mistake.
Anyway, after errors, I doubt that could be the compiler the problem:
6> sitkImage.cxx
6> sitkTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> D:\Project\SimpleITK\Code\Common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkAffineTransform.cxx
6> sitkBSplineTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkDisplacementFieldTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> sitkEuler2DTransform.cxx
6> sitkScaleVersor3DTransform.cxx
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2039: 'TransformCategoryEnum': is not a member of 'itk::TransformBaseTemplate<double>' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6> d:\project\simpleitk\code\common\include\sitkTransform.h(38): note: see declaration of 'itk::TransformBaseTemplate<double>'
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): error C2146: syntax error: missing ';' before identifier 'TransformCategoryEnum' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(150): warning C4091: '': ignored on left of 'int' when no variable is declared [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2825: 'TransformCategoryEnum': must be a class or namespace when followed by '::' [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2510: 'TransformCategoryEnum': left of '::' must be a class/struct/union [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]
6>d:\project\simpleitk\code\common\src\sitkPimpleTransform.hxx(151): error C2065: 'Linear': undeclared identifier [D:\Project\SimpleITK\SuperBuild\bin\SimpleITK-build\Code\Common\src\SimpleITKCommon.vcxproj]