C++ REST SDK is built on Ubuntu 16 by the offical document. To build it on CentOS 7, here's how.
- Install build tools by
sudo yum group install Development\ Tools
- Install dependent libraries by
sudo yum install zlib-devel libicu-devel openssl-devel
- Get CMake 3.x binary from https://cmake.org/download/
- Get Boost 1.58 source code from https://www.boost.org/users/history/ and install it under
/opt/boost_1_58_0
by https://www.boost.org/doc/libs/1_58_0/more/getting_started/unix-variants.html#easy-build-and-install.
CMake and Boost packages for CentOS are not used here because their versions are too old.
- Get source code into a directory, name it
casablanca
. You can get it from official repo or a forked one. export BOOST_ROOT=/opt/boost_1_58_0
- Make sure
casablanca/Release/CMakeLists.txt
contains aWERROR
option. If yes, docmake .. -DCMAKE_BUILD_TYPE=Release -DWERROR=OFF
undercasablanca/Release/build.release
. Otherwise, remove-Werror
fromcasablanca/Release/src/CMakeLists.txt
and docmake .. -DCMAKE_BUILD_TYPE=Release
, undercasablanca/Release/build.release
. make
undercasablanca/Release/build.release
Reference microsoft/cpprestsdk#682 and https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-Linux
can you tell which file are you targetting for the make command. make command requires the target