我无法调试在运行包含OpenCV Rust绑定https://crates.io/crates/opencv/0.65.0的项目时出现的运行时错误
项目生成成功:
[17:24:47] myuser:metadata-portal git:(main*) $ cargo build --release
Finished release [optimized] target(s) in 0.46s
运行cargo命令失败:cargo run --release collect
[2022-10-24T21:05:56Z DEBUG cargo::core::compiler] Not including path /opt/homebrew/opt/opencv/lib in runtime library search path because it is outside target root /Users/<myuser>/code/metadata-portal/target/release
Running `target/release/metadata-cli collect`
[2022-10-24T21:05:57Z ERROR] No such file or directory (os error 2)
我已经安装了来自brew的opencv:brew install opencv
,并且可以确认/opt/homebrew/opt/opencv/lib
存在并且被填充。
如何进行调试呢?
1条答案
按热度按时间n3h0vuf21#
上面的调试输出是一个转移注意力的内容。该问题实际上是由ERROR消息定义的。在实现OpenCV绑定的项目结构中缺少目录。