致命错误:ui_about.h:没有这样的文件或目录



我正在尝试编译以下github包

https://github.com/openalpr/plate_tagger

它使用qt。cmake的输出如下,

CMAKE o/p

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tonystark124/plate_tagger-master/build

当我尝试制作时,我会遇到以下错误:

制造o/p

Scanning dependencies of target openalpr_tagger_automoc
[  1%] Automoc for target openalpr_tagger
Generating moc_about.cpp
Generating moc_directoryloader.cpp
Generating moc_dot.cpp
Generating moc_imageview.cpp
Generating moc_imageviewerbase.cpp
Generating moc_imageviewerobserver.cpp
Generating moc_imageviewerplateselector.cpp
Generating moc_mainwindow.cpp
Generating moc_options.cpp
Generating moc_plateselector.cpp
Generating moc_QProgressIndicator.cpp
Generating moc_squeezedlabel.cpp
Generating moc_threadedimageloader.cpp
[  1%] Built target openalpr_tagger_automoc
Scanning dependencies of target openalpr_tagger
[  3%] Building CXX object CMakeFiles/openalpr_tagger.dir/about.cpp.o
/home/tonystark124/plate_tagger-master/about.cpp:4:22: fatal error: 
ui_about.h: No such file or directory
#include "ui_about.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/openalpr_tagger.dir/about.cpp.o] Error 1
make[1]: *** [CMakeFiles/openalpr_tagger.dir/all] Error 2
make: *** [all] Error 2

基于评论和建议,我尝试定位与qt5相关的mocuic,得到了以下输出。

MOC

which moc
/usr/bin/moc
moc -v
moc 5.2.1

UIC

which uic
/usr/bin/uic
uic -v
uic 5.2.1

我在git中提出了一个问题,因为似乎没有其他人遇到过这个障碍。经过进一步搜索,我倾向于得出结论,缺少qt5的一些安装/部分。Link1和Link2认为这也与qt5cmake有关,但无法确定实际问题。

我该如何解决此问题?

更新

这是系统中另一个人员获得的输出。与我的相比,我已经显示了他们的cmakemake的o/p。

CMAKE o/p

-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 7.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: ~/plate_tagger-master/build

制造o/p

Scanning dependencies of target openalpr_tagger_autogen
[  1%] Automatic MOC and UIC for target openalpr_tagger
Generating MOC source EWIEGA46WW/moc_about.cpp
Generating MOC source EWIEGA46WW/moc_directoryloader.cpp
Generating MOC source EWIEGA46WW/moc_dot.cpp
Generating MOC source EWIEGA46WW/moc_imageview.cpp
Generating MOC source EWIEGA46WW/moc_imageviewerbase.cpp
Generating MOC source EWIEGA46WW/moc_imageviewerobserver.cpp
Generating MOC source EWIEGA46WW/moc_imageviewerplateselector.cpp
Generating MOC source EWIEGA46WW/moc_mainwindow.cpp
Generating MOC source EWIEGA46WW/moc_options.cpp
Generating MOC source EWIEGA46WW/moc_plateselector.cpp
Generating MOC source 53XSUZAO35/moc_QProgressIndicator.cpp
Generating MOC source EWIEGA46WW/moc_squeezedlabel.cpp
Generating MOC source EWIEGA46WW/moc_threadedimageloader.cpp
Generating MOC compilation mocs_compilation.cpp
Generating UIC header include/ui_about.h
Generating UIC header include/ui_directoryloader.h
Generating UIC header include/ui_imageview.h
Generating UIC header include/ui_mainwindow.h
Generating UIC header include/ui_options.h
Generating UIC header include/ui_plateselector.h
[  1%] Built target openalpr_tagger_autogen
Scanning dependencies of target openalpr_tagger

我不明白为什么,但qmake成功了,而不是cmake

相关内容

  • 没有找到相关文章

最新更新