CMAKE、NMAKE makefiles - 'compiler cl not found'(但 VS 12 生成器成功) [英] CMAKE, NMAKE makefiles - 'compiler cl not found' (but VS 12 generator succeeds)

查看:27
本文介绍了CMAKE、NMAKE makefiles - 'compiler cl not found'(但 VS 12 生成器成功)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS环境变量是预先用vcvars32.bat设置的,VS是我唯一使用的编译器;操作系统是 win 7.

The VS environment variable is set beforehand with vcvars32.bat, and VS is the only compiler that I use; the OS is win 7.

错误发生在 cmake-gui;使用路径指定编译器会导致错误编译器无法进行简单测试";或者,命令行中的 cmake -i 最初成功显示选项"菜单,然后无法分配cmakelists.txt"文件(位于 cmake 文件夹中的某个位置).

The error happens with cmake-gui; specifying the compiler with path results in error 'compiler failed to make simple test'; alternatively, cmake -i from command line succeeds initially with presenting an 'options' menu which then fails to allocate a 'cmakelists.txt' file (which is somewhere deeper in the cmake folder).

我哪里出错了?(我继续从 VS 12 构建解决方案文件,但还有其他问题.)

Where am I going wrong? (I continued with building the solution files from VS 12, but there's other issues.)

推荐答案

cmake 邮件列表

从目标环境运行 cmake-gui,就像你运行 cmake...

Run cmake-gui FROM the target environment, just like you run cmake...

即:在设置好东西的 cmd 提示符中输入cmake-gui"在里面.不要只是从快捷方式启动它,除非您正在使用Visual Studio *"生成器.那些不需要任何特殊环境.许多 makefile 文件都可以.

i.e. : type "cmake-gui" in the cmd prompt that has your stuff set up in it. Don't just launch it from a short-cut unless you're using the "Visual Studio *" generators. Those do not need any special environment. Many of the makefile ones do.

这篇关于CMAKE、NMAKE makefiles - 'compiler cl not found'(但 VS 12 生成器成功)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆