These are instructions to build and install NDN-CPP. To cross compile for Anrdoid, see android-native/INSTALL-android.md .
(These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development Prerequisites.)
Following are the detailed steps for each platform to install the prerequisites.
Install Xcode. To install the command line tools, in a terminal enter:
xcode-select --install
Install Brew from https://brew.sh
In a terminal, enter:
brew install openssl
Optional: To install Protobuf, in a terminal, enter:
brew install protobuf
Optional: To install log4cxx, in a terminal, enter:
brew install log4cxx
Optional: To install Doxygen, in a terminal, enter:
brew install doxygen
Optional: To install Boost with asio, in a terminal, enter:
brew install boost
In a terminal, enter:
sudo apt-get install build-essential libssl-dev
Optional: To install libsqlite3, in a terminal, enter:
sudo apt-get install libsqlite3-dev
Optional: To install Protobuf, in a terminal, enter:
sudo apt-get install libprotobuf-dev protobuf-compiler
Optional: To install log4cxx, in a terminal, enter:
sudo apt-get install liblog4cxx10-dev
Optional: To install Doxygen, in a terminal, enter:
sudo apt-get install doxygen
Optional: To install Boost with asio, in a terminal, enter:
sudo apt-get install libboost1.48-all-dev
In a terminal, enter:
sudo apt-get install build-essential libssl-dev
Optional: To install libsqlite3, in a terminal, enter:
sudo apt-get install libsqlite3-dev
Optional: To install Protobuf, in a terminal, enter:
sudo apt-get install libprotobuf-dev protobuf-compiler
Optional: To install log4cxx, in a terminal, enter:
sudo apt-get install liblog4cxx10-dev
Optional: To install Doxygen, in a terminal, enter:
sudo apt-get install doxygen
Optional: To install Boost with asio, in a terminal, enter:
sudo apt-get install libboost-all-dev
In a terminal, enter:
sudo apt install build-essential libssl-dev
Optional: To install libsqlite3, in a terminal, enter:
sudo apt install libsqlite3-dev
Optional: To install Protobuf, in a terminal, enter:
sudo apt install libprotobuf-dev protobuf-compiler
Optional: To install log4cxx, in a terminal, enter:
sudo apt install liblog4cxx-dev
Optional: To install Doxygen, in a terminal, enter:
sudo apt install doxygen
Optional: To install Boost with asio, in a terminal, enter:
sudo apt install libboost-all-dev
Optional: To use boost, you may need to manually install it since apt-get doesn't seem to install the library files.
Cygwin is tested on Windows 7 64-bit.
In the Cygwin installer, select and install the "Devel" packages at the top level of the installer. (The "Devel" packages include libcrypto and libsqlite3.)
(These are instructions to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.)
To build in a terminal, change directory to the NDN-CPP root.
To configure on macOS, enter:
./configure ADD_CFLAGS=-I/usr/local/opt/openssl/include ADD_CXXFLAGS=-I/usr/local/opt/openssl/include ADD_LDFLAGS=-L/usr/local/opt/openssl/lib
To configure on other systems, enter:
./configure
Enter:
make sudo make install
[Ubuntu only] Update the path to the shared libraries:
sudo /sbin/ldconfig
To run the unit tests, in a terminal enter:
make check
To make documentation, in a terminal enter:
make doxygen-doc
The documentation output is in doc/html/index.html. (If you already did ./configure before installing Doxygen, you need to do ./configure again before make doxygen-doc.)
This makes the following libraries:
This makes the following example programs:
Running make doxygen-doc puts code documentation in doc/html.
These steps are only needed to do development of NDN-CPP code and update the build system. First follow the Prerequisites above for your platform.
In a terminal, enter:
brew install automake libtool doxygen
In a terminal, enter:
sudo apt-get install automake libtool doxygen
Follow Development Prerequisites above for your platform. Now you can add source code files and update Makefile.am. After updating, change directory to the NDN-CPP root and enter the following to build the Makefile:
./autogen.sh
To build again, follow the instructions above (./configure, make, etc.)
1.8.6