gpt4 book ai didi

qt - 无法为 qmlrs 运行自定义构建命令

转载 作者:行者123 更新时间:2023-11-29 08:08:45 25 4
gpt4 key购买 nike

我正在尝试使用 qmlrs Rust 绑定(bind)到 Qt,但我无法编译。我已经安装了所有依赖项。

  • 使用rust 1.9.0
  • cargo 0.10.0-每晚(10ddd7d 2016-04-08)

cargo 构建日志:

error: failed to run custom build command for `qmlrs v0.1.1`

Process didn't exit successfully: `/home/pedro/Documents/repositories
/rust-sample/target/debug/build/qmlrs-e7d90e9b9c603e6f/build-script-
build` (exit code: 101)

--- stdout

cargo:rustc-link-lib=static=qmlrswrapper

cargo:rustc-link-lib=dylib=stdc++

cargo:rustc-link-search=native=/home/pedro/.cargo/registry/src/github.com-
88ac128001ac3a9a/qmlrs-0.1.1/ext/libqmlrswrapper/build


--- stderr

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value:
"`\"pkg-config\" \"--libs\" \"--cflags\" \"Qt5Core Qt5Gui Qt5Qml
Qt5Quick\"` did not exit successfully: exit code: 1\n--- stdout\nPackage
Qt5Qml was not found in the pkg-config search path.\nPerhaps you should
add the directory containing `Qt5Qml.pc\'\nto the PKG_CONFIG_PATH
environment variable\nNo package \'Qt5Qml\' found\nPackage Qt5Quick was
not found in the pkg-config search path.\nPerhaps you should add the
directory containing `Qt5Quick.pc\'\nto the PKG_CONFIG_PATH environment
variable\nNo package \'Qt5Quick\' found\n"', ../src/libcore/result.rs:746

note: Run with `RUST_BACKTRACE=1` for a backtrace.

最佳答案

您应该安装提供该文件的 Qt 的 -dev 包。 Here's a hint如何使用 apt-file 找到相关包(如果您使用的是 Debian 衍生发行版)。在您的情况下,错误消息显示也许你应该添加包含 Qt5Qml.pc 的目录,所以:

$ sudo apt install apt-file && sudo apt update
$ apt-file search Qt5Qml.pc
>>> qtdeclarative5-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/Qt5Qml.pc
$ sudo apt install qtdeclarative5-dev

关于qt - 无法为 qmlrs 运行自定义构建命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37912309/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com