Hello,
I have cleared ITK build folder. And did configuration using cmake-gui by selecting Visual studio 2017 generator.
But now I am getting following error.
CMake Error at C:/Users/pooja virkar/Desktop/Study materials/4th semester/pooja/cmake-3.14.0-rc2-win64-x64/share/cmake-3.14/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/MyProjects/ITK-bin/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_9805a.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27027.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_9805a.dir\Debug\\" /Fd"cmTC_9805a.dir\Debug\vc141.pdb" /Gd /TP /analyze- /errorReport:queue "C:\MyProjects\ITK-bin\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"
testCXXCompiler.cxx
cl : Command line error D8050: cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\c1xx.dll': failed to get command line into debug records [C:\MyProjects\ITK-bin\CMakeFiles\CMakeTmp\cmTC_9805a.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:28 (project)
Configuring incomplete, errors occurred!
See also “C:/MyProjects/ITK-bin/CMakeFiles/CMakeOutput.log”.
See also “C:/MyProjects/ITK-bin/CMakeFiles/CMakeError.log”.
But then following steps helped me to remove this error.
- Right-Click on Properties on
cl.exe
in your VS install directory (the exact path appears in the CMake error);
- Choose the Compatibility Tab;
- Check “Run this program as administrator” in the “Privilege Level” box.
After that I again configured it, but now I got following errors.
CMake Error at CMakeLists.txt:28 (project):
No CMAKE_CXX_COMPILER could be found.
CMake Error at CMakeLists.txt:28 (project):
No CMAKE_C_COMPILER could be found.
Configuring incomplete, errors occurred!
See also "C:/MyProjects/ITK-bin/CMakeFiles/CMakeOutput.log".
See also "C:/MyProjects/ITK-bin/CMakeFiles/CMakeError.log".strong text
Please provide solution for the above error.