s290484188
s290484188
采纳率80%
2018-09-05 13:50 阅读 6.8k

Ubuntu 16.04编译QT5问题 xcb相关

5

linux下解压qt-everywhere-src-5.11.1.tar.xz
修改qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf

#

qmake configuration for building with arm-linux-gnueabi-g++

#

MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

modifications to g++.conf

QMAKE_CC = arm-linux-gnueabihf-gcc
QMAKE_CXX = arm-linux-gnueabihf-g++
QMAKE_LINK = arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++

modifications to linux.conf

QMAKE_AR = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy
QMAKE_NM = arm-linux-gnueabihf-nm -P
QMAKE_STRIP = arm-linux-gnueabihf-strip
load(qt_config)

然后
./configure -release -nomake examples -no-iconv -qt-xcb -qpa xcb -xplatform linux-arm-gnueabi-g++ -prefix /home/ubuntu/Qt5.11.1 -opensource -confirm-license -make libs -no-opengl

之后提示
ERROR: Feature 'xcb' was enabled, but the pre-condition 'libs.xcb' failed.

qtbase/src/plugins/platforms/xcb/README内提示的库已经安装

为什么还是不行呢

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    devmiao devmiao 2018-09-05 15:32
  • qq_33218979 select-Caaa 2020-09-24 17:16

    把相关的库装上就好了图片说明
    图片说明

    点赞 评论 复制链接分享
  • swich1234 swich1234 2020-09-18 15:03

    可以解决吗,为什么我静态编译qt5 源码后 根本没有 libQt5xcb.a这个静态库生成呢

    点赞 评论 复制链接分享

相关推荐