CMake: "cl.exe not able to compile a simple test program"
Asked Answered
N

2

-1

I want to build DCMTK in Visual Studio 2010.

I followed the advice here enter link description here, as the image shows.

enter image description here And I still get the same error. Any ideas?

Noddy answered 13/3, 2014 at 23:13 Comment(10)
How do you run cmake?Mlawsky
using the windows guiNoddy
I suspect it means using cmake-gui. What project generator have you selected?Mlawsky
Try running cmake-gui from a Visual Studio 2010 command prompt.Parole
@Sergey: I used Visual Studio 2010.Noddy
@drescherjm: I did that, when running configure I get the following error: CMake Error: Could not find cmake module file: C:/dcmtk_23432/CMakeFiles/2.8.12.2/CMakeCCompiler.cmakeNoddy
Check if that file exits. I mean I have CMakeCCompiler.cmake in X:\x64.6\VC.100\Libraries\DCMTK-3.6.0\CMakeFiles\2.8.12.2 for my DCMTK version 3.6.0 with the binary folder I set at X:\x64.6\VC.100\Libraries\DCMTK-3.6.0Parole
Also I never ever have to mess with any windows compatibility settings to build DCMTK on windows 7, 8, 2012 using cmake and Visual Studio 2010 Pro or Visual Studio 2012.Parole
@drescherjm: no,the file doesn't exist. I have "CMakeRCCompiler.cmake" there. These errors appear on one of my machines, where I recently uninstalled VS2013, not in the other. I tried a re-installation/repair of VS2010 after getting this crap. Didn't work.Noddy
You may have to clear the build folder and start again.Parole
T
1

Run the following script before running cmake.

>vcvars32  (to set some system vars, C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat)
Tudor answered 2/12, 2016 at 19:38 Comment(0)
T
0

A similar problem has been reported here

The solution is:

First, check if you have .NET 4.5 on your system. If you do, that is very likely causing the problem. Try either upgrading to VS2010 SP1 or downgrade .NET to 4.0

CAUSES:

This error appear because you have installed Visual C++ 2012 after you have actually installed Visual C++ 2010 in your system; another cause is because .net Framework 4.5 replace .net Framework 4.0; .net Framework corrupted files;

HOW TO SOLVE:

Uninstall .NET Framework 4.5 from your system; then download .NET Framework 4.0 and install it; this should fix your problem;

Tyrannicide answered 31/10, 2014 at 15:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.