• 5448阅读
  • 7回复

编译QT/EXAMPLES--aclock例子出现问题!求救!!! [复制链接]

上一主题 下一主题
离线戒三
 

只看楼主 倒序阅读 楼主  发表于: 2006-06-16
我编译aclock时,出现问题如下:[root@localhost aclock]# make
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/friendly-arm/x86-qtopia/qt/include -o aclock.o aclock.cpp
aclock.cpp: In member function `void AnalogClock::drawClock(QPainter*)':
aclock.cpp:83: no matching function for call to `QPainter::setWindow(int, int,
  int, int)'
aclock.cpp:85: no matching function for call to `QPainter::viewport()'
aclock.cpp:88: no matching function for call to `QPainter::setViewport(int,
  int, int&, int&)'
aclock.cpp:94: no matching function for call to `QPainter::rotate(int)'
aclock.cpp:100: no matching function for call to `QPainter::rotate(int)'
aclock.cpp:107: no matching function for call to `QPainter::rotate(in

而我查看QPainter类时发现这些函数应该有的,开始我还以为我当初装QT配置的时可能少加了参数,
然后,我从新配置了一次还是出现这样的问题,哪位给解答一下!!!
[ 此贴被XChinux在2006-06-16 23:37重新编辑 ]
离线shiroki

只看该作者 1楼 发表于: 2006-06-19
参见 qpainter.h
setWindow函数的声明是用#ifndef QT_NO_TRANSFORMATIONS括起来的, 说明你的config里定义了这个宏, 所以这些函数都没编进你的qte
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线vera
只看该作者 2楼 发表于: 2006-06-19
编译QT/EXAMPLES下的例子没一个可以通过的。
离线shiroki

只看该作者 3楼 发表于: 2006-06-19
在这些例子的pro文件里你可以找到这样一行(如aclock.pro):
REQUIRES=full-config

说明这个例子要在full-config的qte下编译。 而一般我们用的qpe的config不能完全包含full-config的特性, 所以那些qte的例子都编不过去。 这是正常的。
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线戒三

只看该作者 4楼 发表于: 2006-06-20
谢谢 shiroki 这问题我已经搞定了,我把那宏定义找到了,然后去掉了,从新编译了一次,现在这些例子基本上能编译通过了,呵呵!
离线donylnx
只看该作者 5楼 发表于: 2006-07-18
我也是这么照着做了,可是我make的时候还会有错误说是/usr/bin cannt find lqte,请问是什么原因?谢谢指教!
离线shiroki

只看该作者 6楼 发表于: 2006-07-19
QTDIR环境变量设得不对,要指向qte的路径
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线donylnx
只看该作者 7楼 发表于: 2006-07-20
谢谢板主,我试试
快速回复
限100 字节
 
上一个 下一个