Visual Studio 2015 Build Fail

Machine: Windows 10
Compiler: “Visual Studio 14 2015”
Hi, I am having issues attempting to build the latest stable version of Slicer (Slicer 4.10.1). I have attempted git cloning, configuring, generating, and building 3 times and I get these same errors, I was wondering if anyone has encountered any before and how to solve them?

  1. Multiple “error 9009” problems:

  2. Module machine x86 conflicts with with target machine type x64 for SimpleITK

  3. This CTK issue, with I think has to do with the “error 9009” problems:

Thanks a lot!

You only showed the superbuild result, which does not contain information about why the particular subproject failed to build. Open the .sln file of the first failed subproject and build it to see the actual errors.

Please make sure that your configuration is actually “Visual Studio 14 2015 Win64”, and not the 32 bit one indicated above.

1 Like

Hi, I built the first subproject (CTKAppLauncherLib) that failed and got this error:

1>------ Build started: Project: CTKAppLauncherLib, Configuration: Release x64 ------
1> Creating directories for ‘CTKAppLauncherLib’
1> Building Custom Rule C:/S4/CMakeLists.txt
1> CMake does not need to re-run because C:/S4R/CMakeFiles/generate.stamp is up-to-date.
1> Performing download step (git clone) for ‘CTKAppLauncherLib’
1> – Avoiding repeated git clone, stamp file is up to date: ‘C:/S4R/CTKAppLauncherLib-prefix/src/CTKAppLauncherLib-stamp/CTKAppLauncherLib-gitclone-lastrun.txt’
1> Performing update step for ‘CTKAppLauncherLib’
1> No patch step for ‘CTKAppLauncherLib’
1> Generate version-CTKAppLauncherLib.txt and license-CTKAppLauncherLib.txt
1> Performing configure step for ‘CTKAppLauncherLib’
1> loading initial cache file C:/S4R/CTKAppLauncherLib-prefix/tmp/CTKAppLauncherLib-cache-Release.cmake
1> – Selecting Windows SDK version to target Windows 10.0.17763.
1> – CTKAppLauncher version: 0.1.25-gec98a50
1> – Configuring done
1> – Generating done
1> – Build files have been written to: C:/S4R/CTKAppLauncherLib-build
1> Performing build step for ‘CTKAppLauncherLib’
1> Microsoft ® Build Engine version 14.0.25420.1
1> Copyright © Microsoft Corporation. All rights reserved.
1> Generating moc_ctkAppLauncherEnvironment.cpp
1> ‘C:\ProgramFiles’ is not recognized as an internal or external command,
1> operable program or batch file.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe” exited with code 9009. [C:\S4R\CTKAppLauncherLib-build\Base\CTKAppLauncherLib.vcxproj]
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Additionally, I configured keeping in mind that “x64” must be chosen.

Qt moc (meta object compiler) fails. Which Qt version do you use? Where is it installed? Do you have a “C:\ProgramFiles” folder? Can you find ProgramFiles text any of the *.txt, *.cmake, *.in files in the build tree?

I installed Qt 5.10.0 x64 and its installed in a folder called “C:\ProgramFiles(x86)”. I do not have a “C:\ProgramFiles” folder.The only other ones I have are “C:\Program Files” and “C\Program Files (x86)”. I will try reinstalling Qt if anything perhaps went wrong with my installation.

I think you refer to the build configuration within Visual Studio. It is not enough, you need to make sure the the right configuration is used for CMake. For example

cmake -G "Visual Studio 14 2015 Win64" -DQt5_DIR=C:/Qt/5.10.1/msvc2015_64/lib/cmake/Qt5 c:/d/Slicer

The moc problem might be related, so please do a completely clean build with fresh CMake configuration and generation, and let us know.

After I rebuilt it (keeping in mind that x64 is chosen for my configuration and redownloading qt) I was able to successfully build slicer although 1 subproject failed being "module machine type “x86” conflicted with target machine type “x64” for the Simple-ITK build.

I think the problem was that I previously downloaded a 5.10.0 qt mirror because the qt installer was always failing for me, but I attempted to redownload qt yesterday using the same installer, and it worked just fine.

Thanks for all the help!!