Ubuntu 20.04 中没有 Qt4,卡住了

Ubuntu 20.04 中没有 Qt4,卡住了

我刚刚升级到 Ubuntu Focal Fossa,发现缺少 Qt4,这意味着无法构建抗微

我注意到这个帖子说它可以与 libqt4-dev 一起工作,而且我确信它可以在早期版本的 Ubuntu 上编译得很好。

有没有办法在 Focal Fossa 上安装 Qt4?

使用 Qt5 它可以达到 100%,但在 100% 时失败并出现很多错误:

Scanning dependencies of target antimicro_autogen
[  1%] Automatic MOC for target antimicro
[  1%] Built target antimicro_autogen
[  2%] Generating qrc_resources.cpp
[  2%] Generating ui_mainwindow.h
[  3%] Generating ui_axiseditdialog.h
/home/...../Desktop/antimicro-master/src/axiseditdialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/home/...../Desktop/antimicro-master/src/axiseditdialog.ui: Warning: Z-order assignment: 'verticalSpacer' is not a valid widget.
/home/...../Desktop/antimicro-master/src/axiseditdialog.ui: Warning: Z-order assignment: 'verticalSpacer_2' is not a valid widget.
[  4%] Generating ui_advancebuttondialog.h
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_5' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_6' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_2' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_4' is not a valid widget.
/home/...../Desktop/antimicro-master/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.

[100%] Linking CXX executable bin/antimicro
/usr/bin/ld: CMakeFiles/antimicro.dir/src/main.cpp.o: in function `QtPrivate::MetaObjectForType<JoyButtonSlot*, void>::value()':
main.cpp:(.text._ZN9QtPrivate17MetaObjectForTypeIP13JoyButtonSlotvE5valueEv[_ZN9QtPrivate17MetaObjectForTypeIP13JoyButtonSlotvE5valueEv]+0xb): undefined reference to `JoyButtonSlot::staticMetaObject'
/usr/bin/ld: CMakeFiles/antimicro.dir/src/main.cpp.o: in function `QtPrivate::MetaObjectForType<SetJoystick*, void>::value()':
main.cpp:(.text._ZN9QtPrivate17MetaObjectForTypeIP11SetJoystickvE5valueEv[_ZN9QtPrivate17MetaObjectForTypeIP11SetJoystickvE5valueEv]+0xb): undefined reference to `SetJoystick::staticMetaObject'
/usr/bin/ld: CMakeFiles/antimicro.dir/src/main.cpp.o: in function `QtPrivate::MetaObjectForType<InputDevice*, void>::value()':

collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/antimicro.dir/build.make:1804: bin/antimicro] Error 1
make[1]: *** [CMakeFiles/Makefile2:165: CMakeFiles/antimicro.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

任何帮助都非常感谢!

答案1

这是简单可用实际的 Qt5 依赖关系宇宙口袋焦点. 安装:

sudo add-apt-repository universe
sudo apt-get install antimicro

相关内容