fatal error: ui_about.h: No such file or directory
fatal error: ui_about.h: No such file or directory
我正在尝试编译以下 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
当我尝试 make 时,遇到以下错误:
制作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
根据意见和建议,我尝试将locatemoc和uic关联起来qt5,我得到了以下输出。
交通部
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 的一些 installation/part。 Link1 and Link2 建议这也与 qt5 和 cmake 有关,但我无法查明实际问题。
如何解决这个问题?
更新
这是另一个人在他们系统中获得的输出。我已经展示了他们的 cmake 和 make 的 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
我正在尝试编译以下 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
当我尝试 make 时,遇到以下错误:
制作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
根据意见和建议,我尝试将locatemoc和uic关联起来qt5,我得到了以下输出。
交通部
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 的一些 installation/part。 Link1 and Link2 建议这也与 qt5 和 cmake 有关,但我无法查明实际问题。
如何解决这个问题?
更新
这是另一个人在他们系统中获得的输出。我已经展示了他们的 cmake 和 make 的 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