Giter VIP home page Giter VIP logo

goctp's Introduction

goctp

This library pre-builds the CTP required shared-objects using cgo.

Prerequisites

install go
install swig

Swig file

%% goctp.swigcxx

%module(directors="1") goctp
%{
#include "./api/ThostFtdcUserApiDataType.h"
#include "./api/ThostFtdcUserApiStruct.h"
#include "./api/ThostFtdcTraderApi.h"
#include "./api/ThostFtdcMdApi.h"
%}

%feature("director") CThostFtdcMdSpi;
%feature("director") CThostFtdcTraderSpi;

%include "./api/ThostFtdcUserApiDataType.h"
%include "./api/ThostFtdcUserApiStruct.h"
%include "./api/ThostFtdcTraderApi.h"
%include "./api/ThostFtdcMdApi.h"

If you want to reproduce the same results, copy the above file excluding the %% goctp.swigcxx line and put the file directly under the project folder and then run swig -c++ -cgo -go -intgosize 64 goctp.swigcxx.

部署发布

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

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

goctp's People

Contributors

nathanusask avatar mayiweb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.