CMake: “cl.exe not able to compile a simple test program”

一曲冷凌霜 提交于 2019-12-11 14:57:13

问题


I want to build DCMTK in Visual Studio 2010.

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

And I still get the same error. Any ideas?

回答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)



回答2:


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;



来源:https://stackoverflow.com/questions/22392976/cmake-cl-exe-not-able-to-compile-a-simple-test-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!