2

我正在按照arrayfire-rust 指南设置我自己的 Rust 项目。我可以cargo build,但是当我cargo run,我得到意想不到的结果。如果我直接从 shell 运行程序,我会得到预期的结果。

$cargo run
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
 Running `target/debug/xxx`
 There are 0 available backends

$cargo build
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs

$./target/debug/xxx
There are 2 available backends

main.rs

extern crate arrayfire as af;
use af::*;

fn main() {
    println!("There are {:?} available backends", get_backend_count());
}

货运.toml

[package]
name = "xxx"
version = "0.1.0"
authors = ["xxx"]

[dependencies]
arrayfire = "3.4.1"

我已经向crate 提交了一个问题,维护人员正在调查。

4

0 回答 0