The SDK is compiled by C++ 11.
编译器使用gcc
The SDK has the compatibility on linux system(centos 7) only.
Please make sure the CMake is installed on your OS.
If not, you can follow https://cmake.org/install/ to install it.
The minimum required version of CMake is 3.10, but we suggest to use the lastest CMake version.
github https://github.com/warmcat/libwebsockets.git
示例 https://github.com/warmcat/libwebsockets/tree/master/minimal-examples
github https://github.com/HuobiRDCenter/libdecnumber.git
示例 https://github.com/HuobiRDCenter/libdecnumber/blob/master/src/example1.c
github https://github.com/whoshuu/cpr.git
示例 https://github.com/ramosmy/cpr_exmaple
文档 https://whoshuu.github.io/cpr/
github https://github.com/gabime/spdlog.git
示例 https://github.com/gabime/spdlog/tree/v1.x/example
$ git clone https://gitlab.fedge.cn/krich/token-provider.git
$ cd token-provider
$ ./do_cmake.sh
$ cd build
$ make -j8
#直接使用 hub 镜像
$sudo docker run --network=host -it -v $PWD:/root/docker-shared --name token_client blockfin/token-provider-dev
#进入容器
$sudo docker exec -it token_client_dev bash
#1、安装scl源 yum install centos-release-scl scl-utils-build #2、列出scl可用源 yum list all --enablerepo='centos-sclo-rh' | grep "devtoolset-" #3、安装8版本的工具链(toolchain) 安装需要编译工具包括gcc, gcc-c++, gdb
yum install -y devtoolset-8-toolchain #4、配置环境变量 配置文件/etc/bashrc中加入source /opt/rh/devtoolset-8/enable source /etc/bashrc
#4、查看结果 gcc -v
构建镜像:
#centos
$ docker build -t tokensdkcentos -f ./docker/centos/Dockerfile .
启动:
#centos
$ docker run -itd --network host -v $PWD:/root/work tokensdkcentos
进入容器内部:
$ docker exec -it $(docker ps -qa | head -1) /bin/bash
Content type
Image
Digest
Size
887.5 MB
Last updated
over 6 years ago
docker pull blockfin/token-provider-dev