build fails on Windows 64

I am trying to build sitk on Windows 64 but the build fails. Using cmake for windows it generates only utility projects. I can see some libraries have been built, but no generated header files. The file “SimpleITKBasicFiltersGeneratedHeaders.h” can not find any of its includes. I am not sure how to proceed with this.

Hello and welcome to the ITK community!

The instructions for building the previous release of SimpleITK 2.5.3 are here:

The current development of SimpleITK 3.0 is underway and the CMake infrastructure is under going some major changes (unstable) in the main branch. So please use the release branch to a tag if you are building from source.

What are you building SimpleITK for? Python bindings? or C++ interface?

Please provide some details about what code you downloaded, how you configured, and what the build output is so that we can assist you.

1 Like

Thanks for the reply. I am building sitk for windows 64 for C++. I have downloaded the source code version 2.5.3 and did a Superbuild using cmake for Windows. The generated projects were all Utility projects, none of them were libs. I am suspecting that the LUA version is not correct, I used the latest one 5.5.0 although I am not getting error messages from the cmake file about the version it keeps getting wiped everytim I run a configure on cmake. I will try a lower LUA version and see what happens. I read the build instructions and I can see now that the build downloaded LUA 5.4.7 and swing 4.4. I will try buildoing with these versions and see what happens.

I downloaded a loer LUA version, 5.1, and this is the error I got

CMake Error at C:/Program Files/CMake/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
Could NOT find LuaInterp: Found unsuitable version “5.1.5”, but required is
at least “5.3” (found D:/Libraries/Lua-5.1/lua.exe)

I am not able to find a version 5.3 for windows on the LUA site. Is this supposed to be there in the make file? Should I edit the make file to drop the requirement?

Please start with a clear build directory, then configure CMake with the source directory as the “SuperBuild” sub-directory from the SimpleITK source code: Building SimpleITK — SimpleITK 2.4.0 documentation

Using the super build it will provide the correct version of Lua, SWIG, and ITK expected for the SimpleITK build.

1 Like

I followed the build instructions you mentioned, and still I got this error:

cl error D8021: invalid numeric argument ‘/Wno-invalid-offsetof’ [D:\Libraries\SimpleITK\SuperBuild\build\SimpleITK-build\CMakeFiles\CMakeScratch\TryCompile-jyjz4n\cmTC_387ac.vcxproj]

However this time some of the missing generated header files were generated, but not all of them.

I checked the log file for the different generated projects.

this is the error from the SimpleITK project:

“D:\Libraries\SimpleITK\SuperBuild\build\SimpleITK.vcxproj” (Build target) (1) →
(CustomBuild target) →
MSBUILD : error MSB1009: Project file does not exist.

error from the SimpleITK-build project:

“D:\Libraries\SimpleITK\SuperBuild\build\SimpleITK-build.vcxproj” (Build target) (1) →
(CustomBuild target) →
MSBUILD : error MSB1009: Project file does not exist.

same for the SimpleITK-configure, SimpleITK-Examples, _ENV