CMake configuring fails. “cl.exe is not able to compile a simple test program”

前端 未结 5 1591
南笙
南笙 2020-12-08 03:18

I am trying to build a solution for MSVC++2010 using CMake. Since I installed Visual Studio 2012 that does not work anymore. CMake comes with the following error message: \"

5条回答
  •  情书的邮戳
    2020-12-08 03:39

    I have met this problem, and I fixed by this way. You should run cmake in a console, command like

    >vcvars32  (to set some system vars, C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvar32.bat)
    
    >cmake .. -G"NMake Makefiles" (.. is your code folder) 
    
    >nmake  (It will work well!)
    

    You should do this jod in one console, don't open another.

提交回复
热议问题