Qt问题记录

来源:互联网 发布:湖南大学 双一流 知乎 编辑:程序博客网 时间:2024/04/29 01:24

本人Qt的版本4.4.0.是Open SUSE 11.0 DVD i386集成自带的开发环境。 G++版本是4.3.1。


Q1: make中出现

../../include/QtGui/private/../../../src/gui/painting/qdrawhelper_p.h:1394: 错误:显式特例化不能有存储类型../../include/QtGui/private/../../../src/gui/painting/qdrawhelper_p.h:1400: 错误:显式特例化不能有存储类型../../include/QtGui/private/../../../src/gui/painting/qdrawhelper_p.h:1429: 错误:显式特例化不能有存储类型../../include/QtGui/private/../../../src/gui/painting/qdrawhelper_p.h:1436: 错误:显式特例化不能有存储类型


这个原因是因为G++编译器的问题,版本太高。可以根据错误提示手动修改源代码把 static 去掉。


解下来编译中qdrawhelper.cpp可能也会出现如上情况,解决方案依旧。

 

Q2:make出现

../../include/QtGui/private/../../../src/gui/kernel/qapplication_p.h:347: error: multiple parameters named 'screen' 

 

更改qapplication_p.h并找到相应的位置,将源代码的screen改为screen_t

  #vi src/gui/kernel/qapplication_p.h   #void setScreenTransformation(QScreen *screen, int screen_t, int transformation);



 

原创粉丝点击