QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: sunshinezss

qt/e安装问题-----十万火急!

[复制链接]
发表于 2005-7-22 09:37:34 | 显示全部楼层
你需要先把QTE编译成为Host版,就是不加-xplatform的参数。
make sub-src
cd tools/designer
make
在$QTDIR/bin下面就会出现一个uic了,用介个就可以了。
用高版本的uic不是所有的程序都会出错,编译一些小程序应应急还是可以的。
但是要编译比较的大程序,因为覆盖的QT的方面比较多,所以最好还是要用同版本的uic。
回复

使用道具 举报

发表于 2005-7-22 10:47:43 | 显示全部楼层
多谢,按照你的提示,编译uic的时候出错了,信息如下
[code:1]
g++  -c -I/home/casper/soft/qt_embedded/qt-2.3.10/include -pipe -DQWS-fno-exceptions -fno-rtti -O2 -fno-default-inline -Wall -W -DNO_DEBUG-DUIC -I../shared -I../../../src/3rdparty/zlib -o uic.o uic.cpp
In file included from uic.cpp:21:
uic.h:33: error: `QDomDocument' has not been declared
uic.h:33: error: ISO C++ forbids declaration of `doc' with no type
uic.h:35: error: expected `,' or `...' before '&' token
uic.h:35: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:36: error: expected `,' or `...' before '&' token
uic.h:36: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:38: error: expected `,' or `...' before '&' token
uic.h:38: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:39: error: expected `,' or `...' before '&' token
uic.h:39: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:41: error: expected `,' or `...' before '&' token
uic.h:41: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:42: error: expected `,' or `...' before '&' token
uic.h:42: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:43: error: expected `,' or `...' before '&' token
uic.h:43: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:45: error: expected `,' or `...' before '&' token
uic.h:45: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:46: error: expected `,' or `...' before '&' token
uic.h:46: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:47: error: expected `,' or `...' before '&' token
uic.h:47: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:48: error: expected `,' or `...' before '&' token
uic.h:48: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:49: error: expected `,' or `...' before '&' token
uic.h:49: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:50: error: expected `,' or `...' before '&' token
uic.h:51: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:52: error: expected `,' or `...' before '&' token
uic.h:52: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:53: error: expected `,' or `...' before '&' token
uic.h:53: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:55: error: expected `,' or `...' before '&' token
uic.h:55: error: ISO C++ forbids declaration of `QDomNode' with no type
uic.h:58: error: expected `,' or `...' before '&' token
uic.h:58: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:59: error: expected `,' or `...' before '&' token
uic.h:59: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:60: error: expected `,' or `...' before '&' token
uic.h:60: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:63: error: expected `,' or `...' before '&' token
uic.h:63: error: ISO C++ forbids declaration of `QDomElement' with notype
uic.h:72: error: expected `,' or `...' before '&' token
uic.h:72: error: ISO C++ forbids declaration of `QDomElement' with notype
In file included from uic.cpp:31:
../shared/domtool.h:30: error: expected `,' or `...' before '&' token
../shared/domtool.h:30: error: ISO C++ forbids declaration of `QDomElement' with no type
../shared/domtool.h:31: error: expected `,' or `...' before '&' token
../shared/domtool.h:31: error: ISO C++ forbids declaration of `QDomElement' with no type
../shared/domtool.h:32: error: expected `,' or `...' before '&' token
../shared/domtool.h:32: error: ISO C++ forbids declaration of `QDomElement' with no type
../shared/domtool.h:33: error: expected `,' or `...' before '&' token
../shared/domtool.h:33: error: ISO C++ forbids declaration of `QDomElement' with no type
../shared/domtool.h:34: error: expected `,' or `...' before '&' token
../shared/domtool.h:34: error: ISO C++ forbids declaration of `QDomElement' with no type
../shared/domtool.h:35: error: expected `,' or `...' before '&' token
../shared/domtool.h:35: error: ISO C++ forbids declaration of `QDomElement' with no type
uic.cpp:36: error: expected `,' or `...' before '&' token
uic.cpp:37: error: ISO C++ forbids declaration of `QDomNode' with no type
uic.cpp: In function `QString getComment(int)':
uic.cpp:38: error: expected `;' before "child"
uic.cpp:38: warning: statement has no effect
uic.cpp:39: error: `child' undeclared (first use this function)
uic.cpp:39: error: (Each undeclared identifier is reported only once for each function it appears in.)
uic.cpp: At global scope:
uic.cpp:87: error: expected `,' or `...' before '&' token
uic.cpp:88: error: ISO C++ forbids declaration of `QDomNode' with no type
uic.cpp: In member function `QString Uic::trcall(const QString&, int)':
uic.cpp:89: error: `node' undeclared (first use this function)
uic.cpp: At global scope:
uic.cpp:113: error: `QDomDocument' has not been declared
uic.cpp:114: error: ISO C++ forbids declaration of `doc' with no type
uic.cpp: In constructor `Uic::Uic(QTextStream&, int, bool, bool, const QString&, const QString&)':
uic.cpp:123: error: request for member `firstChild' in `doc', which is of non-class type `int'
uic.cpp:125: error: `QDomElement' undeclared (first use this function)
uic.cpp:125: error: expected `;' before "firstWidget"
uic.cpp:126: error: `firstWidget' undeclared (first use this function)
uic.cpp: At global scope:
uic.cpp:149: error: expected `,' or `...' before '&' token
uic.cpp:150: error: ISO C++ forbids declaration of `QDomElement' withno type
uic.cpp: In member function `QString Uic::getClassName(int)':
uic.cpp:151: error: expected `;' before "n"
uic.cpp:151: warning: statement has no effect
uic.cpp:153: error: `n' undeclared (first use this function)
uic.cpp:153: error: `e' undeclared (first use this function)
uic.cpp: At global scope:
uic.cpp:170: error: expected `,' or `...' before '&' token
uic.cpp:171: error: ISO C++ forbids declaration of `QDomElement' withno type
uic.cpp: In member function `QString Uic::getObjectName(int)':
uic.cpp:172: error: expected `;' before "n"
uic.cpp:172: warning: statement has no effect
uic.cpp:173: error: `n' undeclared (first use this function)
uic.cpp:173: error: `e' undeclared (first use this function)
uic.cpp:175: error: expected `;' before "n2"
uic.cpp:175: warning: statement has no effect
uic.cpp:176: error: `n2' undeclared (first use this function)
uic.cpp: At global scope:
uic.cpp:187: error: expected `,' or `...' before '&' token
uic.cpp:188: error: ISO C++ forbids declaration of `QDomElement' withno type
.......(下面还有很多内容相似的错误)
[/code:1]
请问一下这个是什么问题,谢谢
回复

使用道具 举报

发表于 2005-7-22 11:17:09 | 显示全部楼层
你在编译QTE的时候是不是加了-qconfig qpe了?
去了它,编译主机版本的时候不用加那个
回复

使用道具 举报

发表于 2005-7-23 09:47:36 | 显示全部楼层
嗯,确实加了,多谢,我再去试试:)
回复

使用道具 举报

发表于 2005-7-23 17:11:56 | 显示全部楼层
好了,经过多次尝试,我现在最接近成功的是下面的步骤,设置环境变量的命令我就不写了
1.编译QTE2.3.10的时候
  ./configure -system-jpeg -gif
  make
  这样才能顺利的编译工具,加了其他参数或者是make sub-src都不行
  cd tools/designer
  make
2.编译Qtopia2.1.1的时候
   cd qtopia-free-2.1.1
   cp src/qt/qtconfig-qpe.h ../qt-2.3.10/include/
   make
   出错:(
这是出错的最后几行信息   
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"fifteen\" -DQTOPIA_TRTARGET=\"fifteen\" -DQT_NO_DEBUG -I/home/casper/soft/qt_embedded/qtopia-free-2.1.1/mkspecs/qws/linux-generic-g++ -I. -I../../../include -I/home/casper/soft/qt_embedded/qt-2.3.10/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/fifteen.o fifteen.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"fifteen\" -DQTOPIA_TRTARGET=\"fifteen\" -DQT_NO_DEBUG -I/home/casper/soft/qt_embedded/qtopia-free-2.1.1/mkspecs/qws/linux-generic-g++ -I. -I../../../include -I/home/casper/soft/qt_embedded/qt-2.3.10/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/main.o main.cpp
/home/casper/soft/qt_embedded/qt-2.3.10/bin/moc fifteen.h -o .moc/release-shared/moc_fifteen.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"fifteen\" -DQTOPIA_TRTARGET=\"fifteen\" -DQT_NO_DEBUG -I/home/casper/soft/qt_embedded/qtopia-free-2.1.1/mkspecs/qws/linux-generic-g++ -I. -I../../../include -I/home/casper/soft/qt_embedded/qt-2.3.10/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/moc_fifteen.o .moc/release-shared/moc_fifteen.cpp
g++  -o fifteen .obj/release-shared/fifteen.o .obj/release-shared/main.o .obj/release-shared/moc_fifteen.o   -lqtopia2 -lqtopia -lqpe -L/home/casper/soft/qt_embedded/qtopia-free-2.1.1/lib -L/home/casper/soft/qt_embedded/qt-2.3.10/lib -lqte
.obj/release-shared/moc_fifteen.o(.text+0x80): In function `FifteenMainWindow::staticMetaObject()':
: undefined reference to `QMetaObject::new_metaobject(char const*, char const*, QMetaData*, int, QMetaData*, int, QClassInfo*, int)'
.obj/release-shared/moc_fifteen.o(.text+0xc4): In function `FifteenWidget::staticMetaObject()':
: undefined reference to `QMetaObject::new_metaobject(char const*, char const*, QMetaData*, int, QMetaData*, int, QClassInfo*, int)'
.obj/release-shared/moc_fifteen.o(.text+0x16: In function `PiecesTable::staticMetaObject()':
: undefined reference to `QMetaObject::new_metaobject(char const*, char const*, QMetaData*, int, QMetaData*, int, QClassInfo*, int)'
collect2: ld returned 1 exit status
make[5]: *** [fifteen] 错误 1
make[5]: Leaving directory `/home/casper/soft/qt_embedded/qtopia-free-2.1.1/src/games/fifteen'
make[4]: *** [all] 错误 2
make[4]: Leaving directory `/home/casper/soft/qt_embedded/qtopia-free-2.1.1/src/games/fifteen'
make[3]: *** [sub-games-fifteen] 错误 2
make[3]: Leaving directory `/home/casper/soft/qt_embedded/qtopia-free-2.1.1/src'
make[2]: *** [sub-src-components_pro] 错误 2
make[2]: Leaving directory `/home/casper/soft/qt_embedded/qtopia-free-2.1.1/src'
make[1]: *** [all] 错误 2
make[1]: Leaving directory `/home/casper/soft/qt_embedded/qtopia-free-2.1.1/src'
make: *** [all] 错误 2
[casper@MagicLinux qtopia-free-2.1.1]$
请问这又是什么问题,编译这个还真是难呢
回复

使用道具 举报

发表于 2005-7-26 22:27:45 | 显示全部楼层
错了吧,
cp src/qt/qtconfig-qpe.h ../qt-2.3.10/include/
这一句要在编译qte-2.3.10之前执行,
而且是
cp qtopia-2.1.1/src/qt/qtconfig-qpe.h qt-2.3.10/src/tools/
然后在configure QT/Embedded的时候加上-qconfig qpe,这样才能编译出一个可以用来编译Qtopia的QT/Embedded库。
回复

使用道具 举报

发表于 2005-7-31 20:31:45 | 显示全部楼层
Qtopia只能在嵌入式环境中运行么,我想编译的一个在宿主机上运行的版本.按我前面写的编译没有问题,只有编译Qtopia的时候他提示我要求include/要有qtconfig-qpe.h,所以我才拷贝过去的.这样可以顺利编译.如果编译的时候加上-qconfig qpe的话,上面我不是出错了么
你在编译QTE的时候是不是加了-qconfig qpe了?
去了它,编译主机版本的时候不用加那个
回复

使用道具 举报

发表于 2005-7-31 21:27:10 | 显示全部楼层
一般编译qtopia,需要三样东西,在宿主机运行的uic指令,目标机的libqte库,还有qtopia源码。
不管你的目标机是arm还是x86,首先你要生成一个uic指令,这个uic指令是随Qt/Embedded源码附带,在tools里。而要生成这个uic指令,你首先要有一套在主机运行的libqte库。而生成这个libqte的时候不能加-qconfig qpe,这也就是你当初为什么加了-qconfig qpe出错的原因。
有了uic,第二步是编译一个在目标机上libqte库,这个时候如果你要用它来生成之后的qtopia,编译的时候必须加上-qconfig qpe,这就是你为什么加了-qconfig qpe会出错的原因。实际上完整编译一个qtopia的库应该有三个目录:
qte-2.3.10-host(就为了生成uic)
qte-2.3.10-target(生成为Qtopia所用的libqte)
qtoipa-free-2.1.1(生成Qtopia)
你出错的原因在于,虽然你host和target都是x86但是,任需要有两个版本的Qt/Embedded。
回复

使用道具 举报

发表于 2005-7-31 21:30:21 | 显示全部楼层
如果你想省去第一步生成uic的过程可以用
wget http://vanille.de/tools/uic-qt2
这条指令当一个uic,然后把它改名为uic,并放在path变量最先搜索的目录中。
回复

使用道具 举报

发表于 2005-8-7 21:08:36 | 显示全部楼层
多谢兄台如此耐心的回复,目前因为在家,所以回复不及时,见谅,你的叙述让我有点了解了,不过目前还不能实践,要是有个更详细的编译步骤就更好了,呵呵,谢谢
回复

使用道具 举报

发表于 2005-8-7 23:50:41 | 显示全部楼层
你可以从网上当一个给qt-2.x用的uic:
http://vanille.de/tools/uic-qt2
回复

使用道具 举报

 楼主| 发表于 2005-8-12 09:52:30 | 显示全部楼层
[quote:19a53899a9="bucketxp"]
sunshinezss,libqassistantclient.la是在make tools的时候生成的,应该在$QTDIR/lib目录中,你看看有没有。如果没有,说明你在make tools的时候有什么问题,或者没有走make tools这一步。qt-2.x有的版本会出现这个问题,在make中没有包含make tools这个阶段。
你可先make tools一下,再去make example,试试看。
如果按照lao_la的方法复制了qconfig-qpe.h,你在configure配置的时候加上-qconfig qpe就可以用这个配置文件来配置你的Qt/Embedded。
不过,这个配置文件是当你要用Qt/Embedded来生成Qtopia的时候才用的,他会禁止Qt/Embedded的许多功能和属性来使其具有更高的性能来运行Qtopia,所以你使用了这个配置文件后,你会发现许多的example都编译不过去,因为它们所需要的功能并没有包含在你用qconfig-qpe.h生成的Qt/Embedded的库里。[/quote]

可是我好像不需要Qtopia...至于说make tools没走倒有可能是真的,bin中根本就不生成designer和linguest,是不是因为./configure 选项中包含了 -embedded arm,那麽是不是既然-embedded arm就根本不需要在bin中生成designer和linguest了呢?所以,make中就没有make tools?
回复

使用道具 举报

 楼主| 发表于 2005-8-12 09:56:53 | 显示全部楼层
况且我用的是qte3.2.0,make中应该会有make tools,成功安装的Host版就会有uic,desiginer等
回复

使用道具 举报

 楼主| 发表于 2005-8-12 10:54:08 | 显示全部楼层
[root@xxx tools]# make
Some of the required modules (nocrosscompiler) are not available.
Skipped.
何解?
回复

使用道具 举报

发表于 2005-8-13 10:20:11 | 显示全部楼层
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-3 00:35 , Processed in 0.086018 second(s), 12 queries .

© 2021 Powered by Discuz! X3.5.

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