如何生成LightGBM的dll文件

From Command Line

  1. Install Git for WindowsCMake (3.8 or higher) and VS Build Tools (VS Build Tools is not needed if Visual Studio (2015 or newer) is already installed).

  2. Run the following commands:

    git clone --recursive https://github.com/microsoft/LightGBM
    cd LightGBM
    mkdir build
    cd build
    cmake -A x64 ..
    cmake --build . --target ALL_BUILD --config Release
    

The .exe and .dll files will be in LightGBM/Release folder.

 

注意事項:1,最好下載VS 2017以後的版本,需要安裝C++編譯器和windows 8.0 sdk

2. 如果以前安裝過低版本的VS,後面安裝較新版本的VS,在Git bash裏面使用命令“cmake -A x64 ..”卻找不到編譯器或MSbulid.exe,則需要刪除LightBGM,再重新使用“git clone --recursive https://github.com/microsoft/LightGBM”下載一個新的。

如果還是找不到編譯器,可以將新版本的VS的路徑加入到系統path裏面。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章