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 | |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 9 | Required: libcrypto |
| 10 | Optional: libsqlite3 (for key storage) |
| 11 | Optional: OSX Security framework (for key storage) |
| 12 | |
| 13 | Following are the detailed steps for each platform to install the prerequisites. |
| 14 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame^] | 15 | * Mac OS X 10.7.3, Mac OS X 10.8.4 |
| 16 | Install Xcode. |
| 17 | In Xcode Preferences > Downloads, install "Command Line Tools". |
| 18 | |
| 19 | * Mac OS X 10.9 |
| 20 | Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.) |
| 21 | |
| 22 | * 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] | 23 | In a terminal, enter: |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 24 | sudo apt-get install build-essential |
| 25 | sudo apt-get install libssl-dev |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 26 | |
Jeff Thompson | 1fd7365 | 2013-10-23 16:42:03 -0700 | [diff] [blame] | 27 | * Windows Cygwin |
| 28 | Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the |
| 29 | cygwin installer. This includes libcrypto and libsqlite3. |
| 30 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 31 | Build |
| 32 | ----- |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 33 | (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] | 34 | |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 35 | 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] | 36 | |
| 37 | ./configure |
| 38 | make |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 39 | make install |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 40 | |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 41 | To make documentation, enter: |
| 42 | make doxygen-doc |
| 43 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 44 | Files |
| 45 | ----- |
| 46 | |
| 47 | This makes the following libraries: |
| 48 | |
| 49 | .libs/libndn-c.a: The core C code for encoding and communication. |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 50 | .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] | 51 | |
| 52 | This makes the following test files: |
| 53 | |
| 54 | 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] | 55 | 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] | 56 | bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI. |
| 57 | 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] | 58 | 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] | 59 | |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 60 | Running make doxygen-doc puts code documentation in: |
| 61 | doc/html |
| 62 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 63 | Supported platforms |
| 64 | ------------------- |
| 65 | |
Jeff Thompson | 9b282e0 | 2013-08-09 17:13:38 -0700 | [diff] [blame] | 66 | NDN-CPP is tested on the following platforms: |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame^] | 67 | Ubuntu 12.04 (64 bit and 32 bit) (gcc 4.6.3) |
| 68 | Ubuntu 13.04 (64 bit) (gcc 4.7.3) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 69 | Mac OS X 10.8.4 (clang 4.2) |
| 70 | Mac OS X 10.8.4 (gcc 4.2) |
| 71 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame^] | 72 | Development Prerequisites |
| 73 | ------------------------- |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 74 | 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^] | 75 | First follow the Prerequisites above for your platforms. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 76 | |
Jeff Thompson | 97f4ade | 2013-11-22 12:06:49 -0800 | [diff] [blame] | 77 | * 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] | 78 | Install MacPorts from http://www.macports.org/install.php |
| 79 | In a terminal, enter: |
| 80 | sudo port install automake |
| 81 | sudo port install autoconf |
| 82 | sudo port install libtool |
Jeff Thompson | b2b41e0 | 2013-11-22 12:10:23 -0800 | [diff] [blame] | 83 | sudo port install doxygen |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 84 | |
Jeff Thompson | 9f908dc | 2013-11-22 14:27:17 -0800 | [diff] [blame^] | 85 | * Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit) |
| 86 | In a terminal, enter: |
| 87 | sudo apt-get install automake |
| 88 | sudo apt-get install libtool |
| 89 | sudo apt-get install doxygen |
| 90 | |
| 91 | Development |
| 92 | ----------- |
| 93 | Follow Development Prerequisites above for your platform. |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame] | 94 | Now you can add source code files and update Makefile.am. |
| 95 | After updating, change directory to the NDN-CPP root and enter the following to build the Makefile: |
| 96 | ./autogen.sh |