Can somebody help me please, I am trying to configure CMake with Visual Studio 2010 Express but it's failed. The whole error message is bellow :
The C compiler identification is MSVC 16.0.30319.1 The CXX compiler
identification is MSVC 16.0.30319.1 Check for working C compiler
using: Visual Studio 10 Check for working C compiler using: Visual
Studio 10 -- broken CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/Program Files/Microsoft Visual Studio
10.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/OpenCV2.2/build/CMakeFiles/CMakeTmp
Run Build
Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
cmTryCompileExec2312584318.vcxproj /p:Configuration=Debug
/p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.17929]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 30/05/2013 20:16:01.
Project
"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec2312584318.dir\Debug\".
Creating directory "C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.unsuccessfulbuild"
because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D
"CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec2312584318.dir\Debug\"
/Fd"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb"
/Gd /TC /analyze- /errorReport:queue testCCompiler.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec2312584318.dir\Debug\"
/Fd"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb"
/Gd /TC /analyze- /errorReport:queue testCCompiler.c
testCCompiler.c
ManifestResourceCompile:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.embed.manifest.res" cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318_manifest.rc
Link:
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE
/OUT:"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec2312584318.exe"
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST
/ManifestFile:"cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
/PDB:"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb"
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.lib"
/MACHINE:X86
cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.embed.manifest.res
cmTryCompileExec2312584318.dir\Debug\testCCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file
invalid or corrupt
[C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]
Done Building Project
"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
(default targets) -- FAILED.
Build FAILED.
"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
(default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
[C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.64
CMake will not be able to correctly generate this project. Call
Stack (most recent call first): CMakeLists.txt:47 (project)
Configuring incomplete, errors occurred!
any advice?
Install the windows 7 SDK then install VC-Compiler-KB2519277. Fixed the issue for me.
Was having the same problem with CMake on win7x64. The problem relates to .NET 4.5. If you don't want to uninstall 4.5, and your Solution is already setup, make sure to disable incremental linking, otherwise you will not be able to build.
To fix your CMake issue, you will have to uninstall .NET 4.5 on your machine and re-install .NET 4.0 in order to get CMake to work (4.5 removes all of 4.0's assemblies, etc!)
Apparently can't install 4.0 while 4.5 is already installed, so use Windows Control Panel to do the uninstall (Control Panel\Programs\Programs and Features)
CMake does not consider this a bug, rather it is a MS issue.
If you have Net framework 4.5 installed, you have to update VS 2010 to SP1 in order to make some stuff work correctly. Sometimes you can overcome the problem by just setting off incremental build in project Configurations > Linker settings. If you have VS 2012 installed after VS 2010, then before updating the VS 2010, you need to search at MSDN for the article about avoiding dependencies. My guess is that you will have to uninstall newer versions before upgrading the older ones to new service packs. There is a set of pages in MSDN explaining each step. Just google them. I also had this problem with CMake. This is how i solved it. Furthermore, i already had Windows 7 SDK installed. So i am not sure if it is needed to be installed to solve this problem or not.
In my case installing the VC2010 Service Pack 1 solved my issue after a reboot.
Didn't installed the Windows SDK 7.1 at all or anything else.
If you don't want to re-install .NET Frameworks and/or making 400mb Windows SDK updates, try this lighter solution first.
Related
I'm using CMake 3.23 with Visual Studio 2022. From everything I found about cmake --build command it should be running msbuild, but evidently it's running devenv instead. Is there some setting I'm not aware of? How do I get it to run msbuild so I can pass options to it?
This is my generator command:
cmake -G "Visual Studio 17" -A x64 -T v143 ..
And then cmake --build is running devenv instead of msbuild:
cmake --build . --config Release -- /verbosity:detailed
Microsoft Visual Studio 2022 Version 17.2.3.
Copyright (C) Microsoft Corp. All rights reserved.
Invalid Command Line. Unknown Switch : verbosity:detailed.
Use:
devenv [solutionfile | projectfile | folder | anyfile.ext] [switches]
CMake by default is using MSBuild and falls back to devenv if you either requested it deliberately (with CMAKE_MAKE_PROGRAM) or you have an Intel Fortran project in which case it has to use devenv.
You can check if it found MSBuild by checking the CMAKE_VS_MSBUILD_COMMAND variable. And you can force CMake to use MSBuild by setting CMAKE_MAKE_PROGRAM to the MSBuild path (although I don't know how it will behave if you have a Fortran project).
I'm attempting to match output with a C++ Win32 executable compiled with Visual Studio 2005, so I'm trying to use that MSVC to do so. I have a project defined in CMake. I open "Visual Studio 2005 Command Prompt", but when I try to cmake -G "NMake Makefiles" .. I get LINK : fatal error LNK1104: cannot open file 'user32.lib'.
Here's the CMakeLists.txt:
cmake_minimum_required(VERSION 3.15)
# set the project name
project(LEGOStarWarsSaga)
# add the executable
add_executable(LEGOStarWarsSaga src/main.cpp)
Here's the Visual Studio 2005 Command Prompt output:
C:\Users\aprim\Documents\lstsc>mkdir build
C:\Users\aprim\Documents\lstsc>cd build
C:\Users\aprim\Documents\lstsc\build>cmake -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 14.0.50727
-- The CXX compiler identification is MSVC 14.0.50727
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/aprim/Documents/lstsc/build/CMakeFiles/CMakeTmp
Run Build Command(s):nmake /nologo cmTC_41947\fast && "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_41947.dir\build.make /nologo -L CMakeFiles\cmTC_41947.dir\build
Building C object CMakeFiles/cmTC_41947.dir/testCCompiler.c.obj
C:\PROGRA~2\MI30EB~1\VC\bin\cl.exe #C:\Users\aprim\AppData\Local\Temp\nmBDB4.tmp
testCCompiler.c
Linking C executable cmTC_41947.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_41947.dir --rc=C:\PROGRA~2\MI30EB~1\VC\bin\rc.exe --mt=C:\PROGRA~2\MI30EB~1\VC\bin\mt.exe --manifests -- C:\PROGRA~2\MI30EB~1\VC\bin\link.exe /nologo #CMakeFiles\cmTC_41947.dir\objects1.rsp #C:\Users\aprim\AppData\Local\Temp\nmBE13.tmp
LINK Pass 1: command "C:\PROGRA~2\MI30EB~1\VC\bin\link.exe /nologo #CMakeFiles\cmTC_41947.dir\objects1.rsp /out:cmTC_41947.exe /implib:cmTC_41947.lib /pdb:C:\Users\aprim\Documents\lstsc\build\CMakeFiles\CMakeTmp\cmTC_41947.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL:YES /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_41947.dir/intermediate.manifest CMakeFiles\cmTC_41947.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'user32.lib'
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/aprim/Documents/lstsc/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/aprim/Documents/lstsc/build/CMakeFiles/CMakeError.log".
After reading online, I've come to find that this is something to do with missing the Windows SDK. However, I have the Windows SDKs 7.1 and 10.0 installed. What am I missing?
Bonus points if there's a build tool that'll make this process (nearly) seamless for anyone cloning the project.
EDIT: Installing Visual Studio 2005 Professional with the full Visual C++ option installs the SDK properly, and the project builds. My worry is that not everyone has access to VS 2005 Pro.
I'm trying to build the ParaView-Superbuild (https://gitlab.kitware.com/paraview/paraview-superbuild) on Windows 10 64x.
I cannot manage to get it to work. I just ran from error to error. Currently I'm stuck at:
CMake Error at superbuild/projects/win32/boost.cmake:5 (message):
At least Visual Studio 9.0 is required
Call Stack (most recent call first):
superbuild/cmake/SuperbuildMacros.cmake:690 (include)
superbuild/CMakeLists.txt:145 (_superbuild_discover_projects)
using Cmake 3.13.10-rc1 as generator for Ninja. I have Cygwin64 installed and I'm using the GCC compiler
The C compiler identification is GNU 7.3.0
The CXX compiler identification is GNU 7.3.0
Since I thought that the error has something to do with the compiler I tried to switch to the installed VS2017 compiler. However, the build process will then crash with
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules
/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools
/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/paraview-superbuild/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Ninja/ninja.exe" "cmTC_915a7"
[1/2] Building C object CMakeFiles\cmTC_915a7.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_915a7.exe
FAILED: cmTC_915a7.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
--intdir=CMakeFiles\cmTC_915a7.dir --manifests -- C:\PROGRA~2\MICROS~1
\2017\ENTERP~1\VC\Tools\MSVC\1415~1.267\bin\Hostx64\x64\link.exe /nologo
CMakeFiles\cmTC_915a7.dir\testCCompiler.c.obj /out:cmTC_915a7.exe
/implib:cmTC_915a7.lib /pdb:cmTC_915a7.pdb /version:0.0 /machine:x64
/debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib
winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
advapi32.lib && cd ."
RC Pass 1: command "rc /foCMakeFiles\cmTC_915a7.dir/manifest.res
CMakeFiles\cmTC_915a7.dir/manifest.rc" failed (exit code 0) with the
following output:
The system cannot find the file specified
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (
I don't know how to fix the error using the GCC compiler when the VS one is not working at all. Sadly, I couldn't find any help on the Paraview website.
Has somebody managed to build it and can show me step by step how to do it?
And no, I don't want to use Linux here.
Thanks.
Here is a reliable way to build ParaView Superbuild on windows
Install Visual Studio 2013 community with all C++ related tools
Install cmake
Install git bash
Install Ninja
Install Qt 5.9.2 VS2013
Install other potential dependencies
open git bash
then :
cd C:/
mkdir pv
cd pv
git clone git#gitlab.kitware.com:paraview/paraview-superbuild.git
mv paraview-superbuild pvsb
mkdir pvsb_b
cd pvsb
git submodule update --init --recursive
Open Visual Studio Native Command X64
then :
cd C:\pv\pvsb_b
cmake-gui
configure paraview-superbuild accordingly to your need
ENABLE_qt5 and USE_SYSTEM_qt should be ON
generate
close cmake-gui
ninja
I'm using the command:
cmake CC="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe"
CXX="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe" -G "Visual Studio 12
Win64" -DBOOST_ROOT="c:\local\boost_1_56_0" -DBOOST_LIBRARYDIR="c:\local\boost_1_56_0\lib64-
msvc-12.0" ..
It says:
The C compiler identification is unknown
and
The CXX compiler identification is unknown
How is it possible when I set those variables right there?
EDIT: Error log file:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 12.0.30723.0
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 21-09-2014 20:17:49.
Project "D:\foo\build\CMakeFiles\3.0.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1181: cannot open input file 'gdi32.lib' [D:\foo\build\CMakeFiles\3.0.2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "D:\foo\build\CMakeFiles\3.0.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\foo\build\CMakeFiles\3.0.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1181: cannot open input file 'gdi32.lib' [D:\foo\build\CMakeFiles\3.0.2\CompilerIdC\CompilerIdC.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.47
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 12.0.30723.0
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 21-09-2014 20:17:50.
Project "D:\foo\build\CMakeFiles\3.0.2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
LINK : fatal error LNK1181: cannot open input file 'gdi32.lib' [D:\foo\build\CMakeFiles\3.0.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "D:\foo\build\CMakeFiles\3.0.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\foo\build\CMakeFiles\3.0.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1181: cannot open input file 'gdi32.lib' [D:\foo\build\CMakeFiles\3.0.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.50
The compiler can be selected by using the CC and CXX variables, but by it's much more complicated than using the -G (generator) parameter. For one, the slashes in the path must be Unix style (/) and they don't take effect after the first time CMake configuration is ran unless the cache is cleared.
For a list of available generator options include the --help option
The paths to the Boost library must also use Unix style slashes (/). Many of the commands will convert Windows paths, but when passing in definitions at the command-line you'll want to always use Unix style paths.
Your command would change to the following:
cmake -G "Visual Studio 12 2013 Win64" -DBOOST_ROOT="C:/local/boost_1_56_0" -DBOOST_LIBRARYDIR="C:/local/boost_1_56_0/lib64-msvc-12.0" ..
You'll also want to make sure that your PATH environment variable is setup correctly for Visual Studio and x64. This can be done easily by opening a VS2013 x64 Native Tools Command Prompt using the command below:
cmd /k "%VS120CoMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
In addition, you should make sure you're clearing out the cmake cache before you try. The easiest way to do this is to delete your cmake build folder, but you can also use the CMake-gui to clear the cache.
Check for working C compiler: cl
Check for working C compiler: cl -- broken
CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32
(MESSAGE):The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Gilg/Documents/Projects/builds/CMakeFiles/CMakeTmp
Run Build Command:C:\PROGRA~1\MI30EB~1\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec
Microsoft (R) Visual Studio Version 8.0.50727.762.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
1>------ Build started: Project: cmTryCompileExec, Configuration: Debug
Win32 ------
1>Compiling...
1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762
for 80x86
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\""
/D "_MBCS" /FD /RTCs /MDd /Fo"cmTryCompileExec.dir\Debug\"
/Fd"C:/Users/Gilg/Documents/Projects/builds/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.pdb"
/W3 /c /Zi /TC /Zm1000
1> .\testCCompiler.c
1>testCCompiler.c
1>.\testCCompiler.c : fatal error C1033: cannot open program database
1>Build log was saved at
"file://c:\Users\Gilg\Documents\Projects\builds\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm"
1>cmTryCompileExec - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have added the paths, $(SystemRoot), $(SystemRoot)\System32,$(SystemRoot)\System32\wbem to the vc++ directories in MCVS 2005 and yet I still get this problem. Im not sure what else to do. Any help is greatly appreciated, Thanks.
Looks like something is wrong with how you ran cmake. Erase your entire project, restart from scracth by following the wt on windows installation instructions
I have worked a similar problem recently and it was due to cygwin being in path before the VC200x binary. Solved by placing \cygwin\bin at the very last in C++ Directories->Executables Directories and took it completely out of the system environment path.