LightGBM windows installation issue - cmake - does not support platform specification

北城以北 提交于 2021-02-17 07:01:26

问题


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

I am following the process given on this link

on this command

cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..

it gives the error saying

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".

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

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


回答1:


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 ..

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



来源:https://stackoverflow.com/questions/54742269/lightgbm-windows-installation-issue-cmake-does-not-support-platform-specific

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!