LightGBM Windows安装问题-cmake-不支持平台规范 [英] LightGBM windows installation issue - cmake - does not support platform specification

查看:116
本文介绍了LightGBM Windows安装问题-cmake-不支持平台规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用cmake在Windows 10中安装LightGBM.

I am trying to install LightGBM in windows 10 using cmake.

我正在按照此链接中给出的过程进行操作

I am following the process given on this link

在此命令上

cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..

它给出错误提示

CMake Error at CMakeLists.txt:7 (PROJECT):

  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
-- Configuring incomplete, errors occurred!
See also "C:/Users/meetp/LightGBM/build/CMakeFiles/CMakeOutput.log".

我对此并不陌生,因为我以前从未使用过cmake.

I'm new to this, since I've never used cmake before.

有人可以给我一些有关我需要在cmake命令中添加哪些参数的见解吗?

can someone give me some insights about what parameter i need to add in cmake command?

推荐答案

平台规范主要用于Visual Studio生成器.有时,默认情况下,CMake使用此生成器.在其他情况下,您需要使用 -G 选项明确指定生成器:

Platform specification is mainly used for Visual Studio generator. Sometimes, CMake uses this generator by default. In other cases, you need to specify generator explicitly, with -G option:

cmake -G "Visual Studio 15 2017" -DCMAKE_GENERATOR_PLATFORM=x64 ..

(请确保生成器与您实际拥有的Visual Studio相对应.请参见

(Make sure that generator corresponds to the Visual Studio which you actually have. See list of Visual Studio generators supported by CMake.)

这篇关于LightGBM Windows安装问题-cmake-不支持平台规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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