ubuntu下make Qt4.4.3-x11报错

lingdulebaishi 2012-10-15 10:44:51
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:70:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:65:22: error: X11/Xlib.h: No such file or directory
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:70:23: error: X11/Xutil.h: No such file or directory
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:71:21: error: X11/Xos.h: No such file or directory
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:78:23: error: X11/Xatom.h: No such file or directory
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:70:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:280: error: ‘Colormap’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:281: error: ISO C++ forbids declaration of ‘Visual’ with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:281: error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:290: error: ‘Time’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:291: error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:292: error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:315: error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:318: error: ‘Window’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:319: error: ‘Window’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:319: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:320: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:321: error: ‘Window’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:321: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:332: error: ISO C++ forbids declaration of ‘XSelectionRequestEvent’ with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:332: error: expected ‘,’ or ‘...’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:334: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:335: error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:337: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:338: error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:339: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:341: error: ‘Atom’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:341: error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:342: error: ‘Atom’ has not been declared
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:70:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:343: error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:404: error: ISO C++ forbids declaration of ‘Atom’ with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:404: error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:406: error: ISO C++ forbids declaration of ‘Window’ with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:406: error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:408: error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:414: error: ‘Time’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:415: error: ‘Time’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:441: error: ISO C++ forbids declaration of ‘Visual’ with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:441: error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:442: error: ‘Colormap’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:620: error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:622: error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:645: error: ‘FocusOut’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:646: error: ‘FocusIn’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:647: error: ‘KeyPress’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:648: error: ‘KeyRelease’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:649: error: ‘None’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:650: error: ‘RevertToParent’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:651: error: ‘GrayScale’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:652: error: ‘CursorShape’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:667: error: ‘XPoint’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:667: error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:668: error: ‘XRectangle’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:668: error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:669: error: ‘XChar2b’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:669: error: template argument 1 is invalid
make[1]: *** [.obj/release-shared/qapplication.o] Error 1
make[1]: Leaving directory `/software/qt-x11-opensource-src-4.4.3/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2
...全文
305 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
lingdulebaishi 2012-10-16
  • 打赏
  • 举报
回复
我用的是4.4.3的源码,不知道./configure应该写什么样的参数,还有我通过命令安装了X11,如何链接呢,本人一窍不通,没办法举一反三,还望见谅
polly_polly 2012-10-16
  • 打赏
  • 举报
回复
楼上说的有道理,我发一个configure选项给你参考一下,我编译的是4.8.1,

./configure -prefix /usr/local/Trolltech/QtEmbedded-4.8.1-arm1 -opensource -embedded arm -release -xplatform qws/linux-arm-g++ -depths 16,18,24 -fast -optimized-qmake -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian -no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2 -no-3dnow -no-openssl -no-qvfb -no-nis -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomake examples -nomake tools -nomake docs -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
donwmufromdying 2012-10-16
  • 打赏
  • 举报
回复
按道理你这些错误,configure的时候就会报错的啊!你缺少必要的编译安装条件
风为裳のCode 2012-10-16
  • 打赏
  • 举报
回复
编译的时候链接X11 的库了吗?
lingdulebaishi 2012-10-16
  • 打赏
  • 举报
回复
我还是讲清楚一些吧,我想实现的就是PC上可以编译C++代码并执行看执行效果,然后交叉编译出执行文件到ARM板上执行,就这样就行了
lingdulebaishi 2012-10-16
  • 打赏
  • 举报
回复
今天我在官网上下了http://qt-project.org/downloads,下载了这个QtSdk-offline-linux-x86-v1.2.1.run文件,不知道干嘛用的,也不知道和源码什么关系,教程上没有提到的,里面有lib库了么,还是需要自己再装lib,和源码什么关系呢?
lingdulebaishi 2012-10-16
  • 打赏
  • 举报
回复
SDK和我现在编译的源码有什么关系么,求大虾详解啊
polly_polly 2012-10-16
  • 打赏
  • 举报
回复
我看错了,你是要安装的桌面版的qt是么
那你可以下载qtsdk直接安装就可以了

16,216

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧