Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Updated Wiki: Setup and Build on Linux

$
0
0

How to setup, build, and run tests on Linux

1. Install Ubuntu 12.04 or later.

2. Install git. Open the terminal app (bash) and type:
sudo apt-get install git-core 

3. Create a directory where you want to keep the source tree:
mkdir Cpp-REST-SDK
cd Cpp-REST-SDK

4. To clone this project in Git, use the following command (replace NameOfFolder with the name of the folder where you want the source code to be stored):
git clone https://git01.codeplex.com/casablanca NameOfFolder

Going forward, you will want to pull from the master branch, which will always contain the last known release.

5. Install GCC 4.8:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test  
sudo apt-get update  
sudo apt-get install g++-4.8  

6. While not strictly necessary, we recommend updating g++ and gcc symbolic links as well:
sudo rm /usr/bin/g++  
sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++  
sudo rm /usr/bin/gcc  
sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc 

7. Install additional components needed for the SDK:
sudo apt-get install libxml++2.6-dev  
sudo apt-get install libboost-all-dev  

8. Build the SDK for both debug and release:
cd Cpp-REST-SDK/Release  
make all

You also can build debug and release flavors individually, with 'make debug', 'make release', and clean with 'make clean'.

9. After building you can run the tests entering the following in Binaries/Debug32:
cd Cpp-REST-SDK/Binaries/Debug32
./run_tests.sh 

Viewing all articles
Browse latest Browse all 4845

Trending Articles