C API Tutorial
In this tutorial, we are going to install XGBoost library & configure the CMakeLists.txt file of our C/C++ application to link XGBoost library with our application. Later on, we will see some useful tips for using C API and code snippets as examples to use various functions available in C API to perform basic task like loading, training model & predicting on test dataset. For API reference, please visit XGBoost C Package
Requirements
Install CMake - Follow the cmake installation documentation for instructions. Install Conda - Follow the conda installation documentation for instructions
Install XGBoost on conda environment
Run the following commands on your terminal. The below commands will install the XGBoost in your XGBoost folder of the repository cloned
# clone the XGBoost repository & its submodules
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
# Activate the Conda environment, into which we'll install XGBoost
conda activateenv_name
cmake-Bbuild-S.-DCMAKE_INSTALL_PREFIX
cmake--buildbuild--targetinstall