blob: 3caf65b3104163037b94cb34bbe0b5a26f702a51 [file] [log] [blame]
Jeff Thompson9b282e02013-08-09 17:13:38 -07001NDN-CPP: A Named Data Networking client library for C++ and C
Jeff Thompson057d3182013-08-09 17:02:25 -07002-------------------------------------------------------------
3
4Prerequisites
5-------------
Jeff Thompson9f908dc2013-11-22 14:27:17 -08006(These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system,
7 see Development Prerequisites.)
Jeff Thompson057d3182013-08-09 17:02:25 -07008
Alexander Afanasyev9e92bfd2014-01-24 12:23:33 -08009Required:
10
11* libcrypto
12* libsqlite3
13* libcrypto++
14
15Optional:
16
17* boost libraries (highly recommended)
18* OSX Security framework (for key storage)
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070019
20Following are the detailed steps for each platform to install the prerequisites.
21
Jeff Thompson9f908dc2013-11-22 14:27:17 -080022* Mac OS X 10.7.3, Mac OS X 10.8.4
23Install Xcode.
24In Xcode Preferences > Downloads, install "Command Line Tools".
25
26* Mac OS X 10.9
27Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.)
28
Alexander Afanasyev9e92bfd2014-01-24 12:23:33 -080029If using macports, dependencies can be installed using the following commands:
30
31 sudo port install boost sqlite3 libcryptopp
32
Jeff Thompson9f908dc2013-11-22 14:27:17 -080033* Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit)
Jeff Thompson18f43e12013-11-21 12:45:12 -080034In a terminal, enter:
Alexander Afanasyev9e92bfd2014-01-24 12:23:33 -080035
36 sudo apt-get install build-essential
37 sudo apt-get install libboost-all-dev libssl-dev libsqlite3-dev libcrypto++-dev
Jeff Thompson057d3182013-08-09 17:02:25 -070038
Jeff Thompson1fd73652013-10-23 16:42:03 -070039* Windows Cygwin
40Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the
41cygwin installer. This includes libcrypto and libsqlite3.
42
Jeff Thompson057d3182013-08-09 17:02:25 -070043Build
44-----
Jeff Thompson18f43e12013-11-21 12:45:12 -080045(These are instructions to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.)
Jeff Thompson057d3182013-08-09 17:02:25 -070046
Jeff Thompson18f43e12013-11-21 12:45:12 -080047To build in a terminal, change directory to the NDN-CPP root. Enter:
Jeff Thompson057d3182013-08-09 17:02:25 -070048
Alexander Afanasyev9e92bfd2014-01-24 12:23:33 -080049 ./configure
50 make
51 make install
Jeff Thompson057d3182013-08-09 17:02:25 -070052
Jeff Thompson2f951cf2013-08-11 16:04:09 -070053To make documentation, enter:
Alexander Afanasyev9e92bfd2014-01-24 12:23:33 -080054
55 make doxygen-doc
Jeff Thompson2f951cf2013-08-11 16:04:09 -070056
Jeff Thompson057d3182013-08-09 17:02:25 -070057Files
58-----
59
60This makes the following libraries:
61
62.libs/libndn-c.a: The core C code for encoding and communication.
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070063.libs/libndn-cpp.a: The C++ library API. (If linking to libndn-cpp, don't link to libndn-c since it is included.)
Jeff Thompson057d3182013-08-09 17:02:25 -070064
65This makes the following test files:
66
67bin/test-get-async: Connect to one of the NDN testbed hubs, express an interest and display the received data.
Jeff Thompson13527ab2013-11-21 11:17:09 -080068bin/test-publish-async: Connect to the local NDN hub, accept interests with prefix /testecho and echo back a data packet.
Jeff Thompson057d3182013-08-09 17:02:25 -070069bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI.
70bin/test-encode-decode-data: Encode and decode a data packet, including signing the data packet.
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070071bin/test-encode-decode-forwarding-entry: Encode and decode a data packet, including signing the data packet.
Jeff Thompson057d3182013-08-09 17:02:25 -070072
Jeff Thompson2f951cf2013-08-11 16:04:09 -070073Running make doxygen-doc puts code documentation in:
74doc/html
75
Jeff Thompson057d3182013-08-09 17:02:25 -070076Supported platforms
77-------------------
78
Jeff Thompson9b282e02013-08-09 17:13:38 -070079NDN-CPP is tested on the following platforms:
Jeff Thompson9f908dc2013-11-22 14:27:17 -080080Ubuntu 12.04 (64 bit and 32 bit) (gcc 4.6.3)
81Ubuntu 13.04 (64 bit) (gcc 4.7.3)
Jeff Thompson057d3182013-08-09 17:02:25 -070082Mac OS X 10.8.4 (clang 4.2)
83Mac OS X 10.8.4 (gcc 4.2)
84
Jeff Thompson9f908dc2013-11-22 14:27:17 -080085Development Prerequisites
86-------------------------
Jeff Thompson18f43e12013-11-21 12:45:12 -080087These steps are only needed to do development of NDN-CPP code and update the build system.
Jeff Thompson9f908dc2013-11-22 14:27:17 -080088First follow the Prerequisites above for your platforms.
Jeff Thompson057d3182013-08-09 17:02:25 -070089
Jeff Thompson97f4ade2013-11-22 12:06:49 -080090* Mac OS X 10.7.3, Mac OS X 10.8.4, Mac OS X 10.9
Jeff Thompson18f43e12013-11-21 12:45:12 -080091Install MacPorts from http://www.macports.org/install.php
92In a terminal, enter:
93sudo port install automake
94sudo port install autoconf
95sudo port install libtool
Jeff Thompsonb2b41e02013-11-22 12:10:23 -080096sudo port install doxygen
Jeff Thompson18f43e12013-11-21 12:45:12 -080097
Jeff Thompson9f908dc2013-11-22 14:27:17 -080098* Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit)
99In a terminal, enter:
100sudo apt-get install automake
101sudo apt-get install libtool
102sudo apt-get install doxygen
103
104Development
105-----------
106Follow Development Prerequisites above for your platform.
Jeff Thompson18f43e12013-11-21 12:45:12 -0800107Now you can add source code files and update Makefile.am.
108After updating, change directory to the NDN-CPP root and enter the following to build the Makefile:
109./autogen.sh