Jeff Thompson | 9b282e0 | 2013-08-09 17:13:38 -0700 | [diff] [blame] | 1 | NDN-CPP: A Named Data Networking client library for C++ and C |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 2 | ------------------------------------------------------------- |
| 3 | |
| 4 | Prerequisites |
| 5 | ------------- |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 6 | (These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system, |
| 7 | see Development Prerequisites.) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 8 | |
Alexander Afanasyev | 9e92bfd | 2014-01-24 12:23:33 -0800 | [diff] [blame] | 9 | Required: |
| 10 | |
| 11 | * libcrypto |
| 12 | * libsqlite3 |
| 13 | * libcrypto++ |
| 14 | |
| 15 | Optional: |
| 16 | |
| 17 | * boost libraries (highly recommended) |
| 18 | * OSX Security framework (for key storage) |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 19 | |
| 20 | Following are the detailed steps for each platform to install the prerequisites. |
| 21 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 22 | * Mac OS X 10.7.3, Mac OS X 10.8.4 |
| 23 | Install Xcode. |
| 24 | In Xcode Preferences > Downloads, install "Command Line Tools". |
| 25 | |
| 26 | * Mac OS X 10.9 |
| 27 | Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.) |
| 28 | |
Alexander Afanasyev | 9e92bfd | 2014-01-24 12:23:33 -0800 | [diff] [blame] | 29 | If using macports, dependencies can be installed using the following commands: |
| 30 | |
| 31 | sudo port install boost sqlite3 libcryptopp |
| 32 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 33 | * Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit) |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 34 | In a terminal, enter: |
Alexander Afanasyev | 9e92bfd | 2014-01-24 12:23:33 -0800 | [diff] [blame] | 35 | |
| 36 | sudo apt-get install build-essential |
| 37 | sudo apt-get install libboost-all-dev libssl-dev libsqlite3-dev libcrypto++-dev |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 38 | |
Jeff Thompson | 1fd7365 | 2013-10-23 16:42:03 -0700 | [diff] [blame] | 39 | * Windows Cygwin |
| 40 | Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the |
| 41 | cygwin installer. This includes libcrypto and libsqlite3. |
| 42 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 43 | Build |
| 44 | ----- |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 45 | (These are instructions to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 46 | |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 47 | To build in a terminal, change directory to the NDN-CPP root. Enter: |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 48 | |
Alexander Afanasyev | 9e92bfd | 2014-01-24 12:23:33 -0800 | [diff] [blame] | 49 | ./configure |
| 50 | make |
| 51 | make install |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 52 | |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 53 | To make documentation, enter: |
Alexander Afanasyev | 9e92bfd | 2014-01-24 12:23:33 -0800 | [diff] [blame] | 54 | |
| 55 | make doxygen-doc |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 56 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 57 | Files |
| 58 | ----- |
| 59 | |
| 60 | This makes the following libraries: |
| 61 | |
| 62 | .libs/libndn-c.a: The core C code for encoding and communication. |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 63 | .libs/libndn-cpp.a: The C++ library API. (If linking to libndn-cpp, don't link to libndn-c since it is included.) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 64 | |
| 65 | This makes the following test files: |
| 66 | |
| 67 | bin/test-get-async: Connect to one of the NDN testbed hubs, express an interest and display the received data. |
Jeff Thompson | 13527ab | 2013-11-21 11:17:09 -0800 | [diff] [blame] | 68 | bin/test-publish-async: Connect to the local NDN hub, accept interests with prefix /testecho and echo back a data packet. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 69 | bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI. |
| 70 | bin/test-encode-decode-data: Encode and decode a data packet, including signing the data packet. |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 71 | bin/test-encode-decode-forwarding-entry: Encode and decode a data packet, including signing the data packet. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 72 | |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 73 | Running make doxygen-doc puts code documentation in: |
| 74 | doc/html |
| 75 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 76 | Supported platforms |
| 77 | ------------------- |
| 78 | |
Jeff Thompson | 9b282e0 | 2013-08-09 17:13:38 -0700 | [diff] [blame] | 79 | NDN-CPP is tested on the following platforms: |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 80 | Ubuntu 12.04 (64 bit and 32 bit) (gcc 4.6.3) |
| 81 | Ubuntu 13.04 (64 bit) (gcc 4.7.3) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 82 | Mac OS X 10.8.4 (clang 4.2) |
| 83 | Mac OS X 10.8.4 (gcc 4.2) |
| 84 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 85 | Development Prerequisites |
| 86 | ------------------------- |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 87 | These steps are only needed to do development of NDN-CPP code and update the build system. |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 88 | First follow the Prerequisites above for your platforms. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 89 | |
Jeff Thompson | 97f4ade | 2013-11-22 12:06:49 -0800 | [diff] [blame] | 90 | * Mac OS X 10.7.3, Mac OS X 10.8.4, Mac OS X 10.9 |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 91 | Install MacPorts from http://www.macports.org/install.php |
| 92 | In a terminal, enter: |
| 93 | sudo port install automake |
| 94 | sudo port install autoconf |
| 95 | sudo port install libtool |
Jeff Thompson | b2b41e0 | 2013-11-22 12:10:23 -0800 | [diff] [blame] | 96 | sudo port install doxygen |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 97 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame] | 98 | * Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit) |
| 99 | In a terminal, enter: |
| 100 | sudo apt-get install automake |
| 101 | sudo apt-get install libtool |
| 102 | sudo apt-get install doxygen |
| 103 | |
| 104 | Development |
| 105 | ----------- |
| 106 | Follow Development Prerequisites above for your platform. |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 107 | Now you can add source code files and update Makefile.am. |
| 108 | After updating, change directory to the NDN-CPP root and enter the following to build the Makefile: |
| 109 | ./autogen.sh |