在我的ubuntu14.04上“找不到Qt 3.x,请手动设置QT_INCLUDE,QT_LIB,MOC”


1

我正在尝试从github https://github.com/nii2121/gmapping/blob/master/docs/Instructions.txt安装gmapping包, 然后运行

./configure

原来是

No 'CXX' environment variable found, using g++.
No 'CC' environment variable found, using gcc.
Using C++ compiler: g++
Using C compiler: gcc
Checking for Qt 3.x ... 

*** Qt 3.x not found please set QT_INCLUDE, QT_LIB, MOC by hand

有人知道吗?提前致谢!

Answers:


0

您将需要一些开发包:

sudo apt-get install libqt4-dev

按照此补丁编辑./configure:

@@ -48,6 +48,11 @@

        fi ;
 done ;
+
+MOC="/usr/bin/moc" ;
+QT_LIB="-L /usr/lib/x86_64-linux-gnu/ -lqt-mt" ;
+QT_INCLUDE="-I /usr/include/qt"
+
 if [ ! "$QT_INCLUDE" ]; then
        echo -e "\n\n*** Qt 3.x not found please set QT_INCLUDE, QT_LIB, MOC by hand\n\a"
        exit 1
@@ -64,6 +69,8 @@
        fi ;
 done ;

+UIC="/usr/usr/bin/uic";
+
 if [ ! "$UIC" ]; then
        echo -e "\n\n*** uic  not found please set UIC by hand\n\a"
        exit 1

这将使您走得更远,但是您仍然需要在某些地方安装卡门 -也许遵循本指南

额外说明,如果您想找出哪个软件包提供了configure脚本正在寻找的文件,则apt-file搜索是您的朋友:

sudo apt-get install apt-file
apt-file update
apt-file search bin/uic  # for example

感谢您的回答。但是在安装所有依赖包之后,我仍然遇到相同的问题。这太奇怪了……
user7487638 '17

您还编辑了配置文件吗?
清澈的风

不,我保持不变
user7487638'2

好的,根据我的帖子-您需要编辑文件。在文件中的指定位置,在其旁边添加带有+的行
cleary
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.