一、编译错误
安装qmetaobject后,编译出现下面错误信息,原因是环境变量和搜索路径没有正确设置。
qt_gui>cargo run
warning: unused manifest key: buildCompiling qttypes v0.2.11
error: failed to run custom build command for `qttypes v0.2.11`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.Caused by:process didn't exit successfully: `D:\DiskX\Demos\2024-01-05 Rust_QT\qt_gui\target\debug\build\qttypes-624ed0d59ffcb9fe\build-script-build` (exit code: 101)--- stdoutcargo:rerun-if-env-changed=QT_INCLUDE_PATHcargo:rerun-if-env-changed=QT_LIBRARY_PATHcargo:rerun-if-env-changed=QMAKE
二、设置 RUST_BACKTRACE
环境变量RUST_BACKTRACE的设置:
三、设置 Path 搜索路径设置:
增加下面两个搜索路径:
4、编译运行
在这里插入图片描述