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

前端 未结 5 1574
南笙
南笙 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:44

    I encounter the excatly same problem. I solved by add a command before cmake

    call "C:/Program Files (x86)/VC/vcvarsall.bat" amd64

    The path of vcvarsall.bat and the architecture maybe different on your computer.

    According to Usage of vcvarsall.bat, this command is to set up proper environment variable for command-line compilation.

提交回复
热议问题