Skip to content

Commit

Permalink
更新 demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mayiweb committed Dec 16, 2023
1 parent bfff649 commit fef0c25
Show file tree
Hide file tree
Showing 20 changed files with 21,488 additions and 20,056 deletions.
68 changes: 34 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# goctp
上海期货交易所 ctp 接口 Golang版 (for linux64)

## 环境安装
go版本 go1.15.14
swig版本 4.0.2

## 构建
码云地址国内的速度快
go get -u gitee.com/mayiweb/goctp

github
go get -u github.com/mayiweb/goctp

构建过程比较慢需要多等一会儿
通过 go get 下载会自动构建也可以手动构建进入 github.com/mayiweb/goctp 目录 执行 make install 即可

## 依赖
ctp 默认使用 gbk 编码需要用到开源库转换为 utf8
go get -u github.com/axgle/mahonia

## 编译
进入 github.com/mayiweb/goctp/demo 目录或将该目录里面的文件全部复制出来组成一个新项目
make build
编译成功后会在当前目录生成 ctp 可执行文件可以修改 Makefile 文件改变生成的文件名
./ctp [运行模式|默认test]

## 部署发布
生成 ctp 文件后使用 ldd ctp 命令查看依赖关系并将如下文件放在同一文件夹(注意需要有执行权限):
ctp
libruntime,sync-atomic.so
libthostmduserapi_se.so
libthosttraderapi_se.so

# goctp
上海期货交易所 ctp 接口 Golang版 (for linux64)

## 环境安装
go版本 go1.15.14
swig版本 4.0.2

## 构建
码云地址国内的速度快
go get -u gitee.com/mayiweb/goctp

github
go get -u github.com/mayiweb/goctp

构建过程比较慢需要多等一会儿
通过 go get 下载会自动构建也可以手动构建进入 github.com/mayiweb/goctp 目录 执行 make install 即可

## 依赖
ctp 默认使用 gbk 编码需要用到开源库转换为 utf8
go get -u github.com/axgle/mahonia

## 编译
进入 github.com/mayiweb/goctp/demo 目录或将该目录里面的文件全部复制出来组成一个新项目
make build
编译成功后会在当前目录生成 ctp 可执行文件可以修改 Makefile 文件改变生成的文件名
./ctp [运行模式|默认test]

## 部署发布
生成 ctp 文件后使用 ldd ctp 命令查看依赖关系并将如下文件放在同一文件夹(注意需要有执行权限):
ctp
libruntime,sync-atomic.so
libthostmduserapi_se.so
libthosttraderapi_se.so

将部署目录路径写入 /etc/ld.so.conf 文件最后一行并执行 /sbin/ldconfig 命令
Loading

0 comments on commit fef0c25

Please sign in to comment.