C/C++ implementation of OpenTimestamps
Build libc_opentimestamps
shared library and main
sample binary.
mkdir build
cd build
cmake ../
make
The sample main.cpp
imports and uses shared library.
To compile successfully follow:
g++ main.cpp -o main -L./build/ -lc_opentimestamps
./main
If cmake ../
result's is somethings similar to:
{…omissis…}
CMake Error at /usr/local/{…omissis…}/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
{…omissis…}
you can specify the right path to OpenSSL in OPENSSL_ROOT_DIR
; for example:
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ../
to debug:
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=Debug ../
Install swig
to generate the wrapper code ots.py
cd swig
./build.sh
Import and Run on python2.7
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ots
>>> dir(ots)
libopenssl library