如何修复CMakeLists.txt中的CMake错误:生成器NMake Makefile不支持平台规范,但是指定了平台x64 [英] how to fix CMake Error in CMakeLists.txt: Generator NMake Makefiles does not support platform specification, but platform x64 was specified

查看:1280
本文介绍了如何修复CMakeLists.txt中的CMake错误:生成器NMake Makefile不支持平台规范,但是指定了平台x64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows 10
中使用cmd使用 pip install dlib 安装dlib,但它显示以下三个错误:
CMake CMakeLists.txt中的错误:
生成器

I want to install dlib using pip install dlib using cmd in windows 10 But it is showing following three errors: CMake Error in CMakeLists.txt: Generator

    NMake Makefiles

  does not support platform specification, but platform

    x64

  was specified.


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

信息:
pip 9.0.1 from d:\python36\lib\site-packages(python 3.6)
cmake 0.9.0
Windows 10专业版(64位)
版本:10.0.16299 Build 16299

INFORMATION: pip 9.0.1 from d:\python36\lib\site-packages (python 3.6) cmake 0.9.0 windows 10 pro(64-bit) Version: 10.0.16299 Build 16299

推荐答案

我在Windows 10,Python 3.5,pip 10

即使安装了cmake,dlib也无法正常工作。
解决方案:

I am on windows 10, python 3.5, pip 10
dlib didn't work even after installing cmake. Solution :


  • 将cmake添加到PATH(C:\Program Files\CMake\bin)

  • 然后使用 pip 安装:

pip install dlib==19.4


Works

在Windows October更新之后,上述方法仍然有效,但有时错误,例如提升错误 cmake不兼容
这样,

After windows October update, the above method works, but sometimes there are errors like boost error and cmake incompatible. so,


  • 下载并安装 CMake msi

  • 将cmake添加到PATH(C:\ \程序文件\CMake\bin)

  • 重新启动Windows

  • Download and install CMake msi
  • Add cmake into PATH(C:\Program Files\CMake\bin)
  • Restart Windows
pip install dlib

pip install dlib==19.4


这篇关于如何修复CMakeLists.txt中的CMake错误:生成器NMake Makefile不支持平台规范,但是指定了平台x64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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