Published 7 May 2019

Using Credits API in C++ (demo). Cmake. Cross platform

Requirements

Requirements

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

https://git-scm.com/

Boost is a set of libraries for the C++ programming language that provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains over eighty individual libraries.

https://www.boost.org/

CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.

https://cmake.org/

The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.

https://thrift.apache.org/

 

Preparing:

 

In this string, you should write your public key

publicKey = '[your public key]'

 

In this string, you should write the IP address of your running node

tr = TSocket('[your node’s IP address]', 9090)

 

Using:

    1. git clone https://github.com/CREDITSCOM/Examples, next use the folder ./API/CreditsCPlusPlusDemoCMake
    2. Windows
      1. build64.cmd
      2. run.cmd
    3. Linux

 

  • build64.sh
  • runme.sh

 

The result in Windows

Build

 

Run

The result in Linux

Build

 

Run

 

 

 

 

 

 

 

 

Votes 0, average rating 0

Contents