天嵌 ARM开发社区

 找回密码
 注册
查看: 2306|回复: 1

关于:error: Qt (>= Qt 2.2.2) (headers and libraries) not found

[复制链接]
lshiren 发表于 2011-2-20 14:14:28 | 显示全部楼层 |阅读模式
俺在Fedora14下安装qtopia,出现了错误:
error: Qt (>= Qt 2.2.2) (headers and libraries) not found
打开config.log以后,发现是这里出了问题:

configure:22038: checking for Qt
configure: 22103: /usr/lib/qt-3.3/include/qstyle.h
configure: 22103: /usr/lib/qt-3.3/include/qstyle.h
configure: 22103: /usr/lib/qt-3.3/include/qstyle.h
configure: 22103: /usr/lib/qt-3.3/qstyle.h
configure: 22103: /usr/lib/qt2/include/qstyle.h
configure: 22103: /usr/lib/qt2/qstyle.h
configure: 22103: /usr/lib/qt/include/qstyle.h
configure: 22103: /usr/lib/qt/qstyle.h
configure: 22103: /usr/local/qt/include/qstyle.h
configure: 22103: /usr/include/qt/qstyle.h
configure: 22103: /usr/include/qstyle.h
configure: 22103: /usr/X11R6/include/X11/qt/qstyle.h
configure: 22103: /usr/X11R6/include/qt/qstyle.h
configure: 22103: /usr/X11R6/include/qt2/qstyle.h
configure:22214: rm -rf SunWS_cache; g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -fno-exceptions -fno-check-new -fno-rtti -INO  -DQWS -D_REENTRANT  -L/usr/lib/qt-3.3/lib   -L/lib  conftest.cc  -lqte -lpng -lz -lm -ljpeg  1>&5
cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC but not for C++
conftest.cc:2:21: fatal error: qglobal.h: No such file or directory
compilation terminated.
configure:22217: $? = 1
configure: failed program was:
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#if QT_VERSION < 210
#error 1
#endif
#if ! (QT_VERSION >= 222)
#error 1
#endif

int main() {
    QStringList *t = new QStringList();
    Q_UNUSED(t);
    QString s;
    s.setLatin1("Elvis is alive", 14);
    return 0;
}
configure:22257: error: Qt (>= Qt 2.2.2) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log.


俺发现问题的原因可能是:configure:22038: checking for Qt
检查Qt时,定位头文件没有找到。因为在Fedora14中,qstyle.h及其它头文件的路径是:
/usr/include/Qt,而系统检查的几个路径都不存在。
configure: 22103: /usr/include/qt/qstyle.h(注意此处的qt是小写!Linux大小写敏感)
所以,将路径/usr/include/Qt,列为Qt检查时的路径,可以解决此问题?
问题是:怎么做此事?
现在俺想到的办法是;做一个符号链接,让/usr/include/qt指向/usr/include/Qt

请高手指教!
 楼主| lshiren 发表于 2011-2-20 16:06:23 | 显示全部楼层
添加符号链接后,错误变为:
configure:22257: error: Qt (>= Qt 2.2.2) (library qte) not found. Please check your installation!
无解等待中.............

config.log的内容为:
cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC but not for C++
conftest.cc: In function 'int main()':
conftest.cc:18:7: error: 'class QString' has no member named 'setLatin1'
configure:22217: $? = 1
configure: failed program was:
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#if QT_VERSION < 210
#error 1
#endif
#if ! (QT_VERSION >= 222)
#error 1
#endif

int main() {
    QStringList *t = new QStringList();
    Q_UNUSED(t);
    QString s;
    s.setLatin1("Elvis is alive", 14);
    return 0;
}
configure:22257: error: Qt (>= Qt 2.2.2) (library qte) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2025-5-3 06:49 , Processed in 2.038059 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表