added mingw64 installation instruction, and library file copy. (#2977)

* added mingw64 installation instruction, and library file copy.

* Change all `libxgboost.dll` to `xgboost.dll`

On Windows, the library file is called `xgboost.dll`, not `libxgboost.dll` as in the build doc previously
This commit is contained in:
cinqS 2018-02-09 17:54:15 +08:00 committed by Philip Cho
parent 874525c152
commit b99f56e386

View File

@ -4,7 +4,7 @@ Installation Guide
This page gives instructions on how to build and install the xgboost package from
scratch on various systems. It consists of two steps:
1. First build the shared library from the C++ codes (`libxgboost.so` for linux/osx and `libxgboost.dll` for windows).
1. First build the shared library from the C++ codes (`libxgboost.so` for Linux/OSX and `xgboost.dll` for Windows).
- Exception: for R-package installation please directly refer to the R package section.
2. Then install the language packages (e.g. Python Package).
@ -39,7 +39,7 @@ even better to send pull request if you can fix the problem.
Our goal is to build the shared library:
- On Linux/OSX the target library is `libxgboost.so`
- On Windows the target library is `libxgboost.dll`
- On Windows the target library is `xgboost.dll`
The minimal building requirement is
@ -112,6 +112,20 @@ All the following steps are in the `Git Bash`.
In MinGW, `make` command comes with the name `mingw32-make`. You can add the following line into the `.bashrc` file.
> if you don't have a MinGW installed on your machine and you are using *Windows x86_64*. try to download one From
> [https://sourceforge.net/projects/mingw-w64/](https://sourceforge.net/projects/mingw-w64/)
> after the installation, add the path of your installation to the system *env* properties.
> the installation path added to your *env* properties should be pointed to the `bin` folder, like:
> `C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin`
> for users using *Windows 32*, try to find a *mingw32* version instead.
> you are ok to follow the below instructions.
```bash
alias make='mingw32-make'
```
@ -130,7 +144,7 @@ cd build
cmake .. -G"Visual Studio 12 2013 Win64"
```
This specifies an out of source build using the MSVC 12 64 bit generator. Open the .sln file in the build directory and build with Visual Studio. To use the Python module you can copy libxgboost.dll into python-package\xgboost.
This specifies an out of source build using the MSVC 12 64 bit generator. Open the .sln file in the build directory and build with Visual Studio. To use the Python module you can copy `xgboost.dll` into python-package\xgboost.
Other versions of Visual Studio may work but are untested.
@ -169,6 +183,8 @@ If build seems to use only a single process, you might try to append an option l
### Windows Binaries
After the build process successfully ends, you will find a `xgboost.dll` library file inside `./lib/` folder, copy this file to the the API package folder like `python-package/xgboost` if you are using *python* API. And you are good to follow the below instructions.
Unofficial windows binaries and instructions on how to use them are hosted on [Guido Tapia's blog](http://www.picnet.com.au/blogs/guido/post/2016/09/22/xgboost-windows-x64-binaries-for-download/)
### Customized Building