GithubHelp home page GithubHelp logo

ctp-rs's Issues

0.0

hhhhh我也写了不过没开源 ~~

找不到.so文件

你好,这个项目我构建成功了,更新了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?

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
哪里可以下载?

pRspInfo 打印出来是 0x0 怎么办

系统: 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,
      ) 
}

编译报错

我在windows编译的时候出了下面的错误:
image
我的rust版本是1.69, windows11。请问这是什么导致的?

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.