sheldonnico / ctp-rs Goto Github PK
View Code? Open in Web Editor NEWrust bindings for ctp
rust bindings for ctp
hhhhh我也写了不过没开源 ~~
系统: Ubuntu 22.04.2 LTS
rustc 1.68.2 (9eb3afe9e 2023-03-27)
trader_api: v6.6.9_20220914
您好,我在实现 trader api 的时候,在 simnow 查询合约的接口的 pRspInfo 字段打印出来是 0x0
,访问字段就会崩溃。
该接口其余字段都是正常的,前面连接、登录的接口该字段也都是正常的。
请问这个是什么原因呢?该怎么解决啊
impl Rust_CThostFtdcTraderSpi_Trait for Spi {
fn on_rsp_qry_instrument(
&mut self, pInstrument: *mut ctp_api::CThostFtdcInstrumentField,
pRspInfo: *mut ctp_api::CThostFtdcRspInfoField, nRequestID: std::os::raw::c_int, bIsLast: bool,
)
}
你好,这个项目我构建成功了,更新了6.6.9的版本,examples的文件我不知道怎么跑,于是new了一个新项目,将md的例子拷贝到main.rs下 cargo run.
在Cargo.toml里引入
ctp_rs = { path = "../../xxx/ctp-rs" }
一开始是报的找不到 DataCollect 那三个库文件,加了lib前缀之后报错变了,如下所示:
error while loading shared libraries: libthostmduserapi_se.so: cannot open shared object file: No such file or directory
请问这个该如何解决呢?我在ctp-rs 目录重新build了,报错是有变化,说明是生效了,但是还是有问题。现在我把shared拷贝到这个单独的项目也不起作用。🙏
shared
├── data_collect
│ ├── unix.x86_64
│ │ ├── libLinuxDataCollect.so -> LinuxDataCollect.so
│ │ └── LinuxDataCollect.so
│ ├── windows.x86
│ │ ├── WinDataCollect.dll
│ │ └── WinDataCollect.lib
│ └── windows.x86_x64
│ ├── WinDataCollect.dll
│ └── WinDataCollect.lib
找不到相应的libLinuxDataCollect.so -> LinuxDataCollect.so
│ │ └── LinuxDataCollect.so
sg@DESKTOP-MEDPUTU:~/ctp_rs_0215$ tree shared
shared
└── include
├── DataCollect.h
├── ThostFtdcMdApi.h
├── ThostFtdcTraderApi.h
├── ThostFtdcUserApiDataType.h
└── ThostFtdcUserApiStruct.h
1 directory, 5 files
哪里可以下载?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.