简体   繁体   English

Qt Armhf交叉编译器

[英]Qt cross-compiler for armhf

I have to install and configure Qt on my virtual machine, I crossed a few steps in that installation, but I get stuck in situation when I need to add appropriate qmake file. 我必须在虚拟机上安装和配置Qt,在安装过程中我走了几个步骤,但是当我需要添加适当的qmake文件时遇到了麻烦。 I installed qt4-qmake and qt5-qmake in the hope that they will be located in /usr/bin and I thought that those files need to be added to Build & Run -> Qt Versions 我安装了qt4-qmake和qt5-qmake,希望它们位于/ usr / bin中,我认为这些文件需要添加到Build&Run-> Qt Versions中。

When trying to add qmake (qt5-qmake) I get error "The qmake executable could not be added..." 尝试添加qmake(qt5-qmake)时,出现错误“无法添加qmake可执行文件...”

When I add qmake-qt4 it tells me that my Qt version is invalid, here is the picture 当我添加qmake-qt4时,它告诉我我的Qt版本无效,这是图片

在此处输入图片说明

What else should I try? 我还应该尝试什么? Install older version of Qt? 安装旧版本的Qt? Where to find it? 在哪里找到它?

I installed Qt via qt-opensource-linux-x86-5.5.1.run on my Debian 32bit virtual machine. 我在我的Debian 32位虚拟机上通过qt-opensource-linux-x86-5.5.1.run安装了Qt。

Download and install a Qt compiled for armhf (not x86 as you did, apt sources files are generally build for the own architecture). 下载并安装为armhf编译的Qt(不是像您那样的x86,apt源文件通常是针对自己的体系结构构建的)。 This will include an armhf-build qmake. 这将包括一个armhf-build qmake。

As an alternative you can download the source, setup a cross-compiler armhf build-chain (g++ for armhf) and compile qt by yourself. 或者,您可以下载源代码,设置交叉编译器armhf构建链(对于armhf为g ++),然后自行编译qt。

Advantage of a complete package (Qt for Android for example) is you already get the complete armhf build-chain including the timeconsuming build shared libraries 完整软件包(例如,Qt for Android)的优点是您已经获得了完整的armhf构建链,其中包括耗时的构建共享库

You need to download a complete installation of Qt that is built for armhf and compatible with your system. 您需要下载Qt的完整安装,该安装是为armhf构建的,并且与您的系统兼容。 That installation should contain also a qmake binary built for x86 or x64, depends on your platform. 该安装还应包含为x86或x64构建的qmake二进制文件,具体取决于您的平台。 Once you select that, you'll also have to select the proper crosscompiler and set it in the "Compilers" tab you see in the shot. 选择该选项后,还必须选择适当的交叉编译器,并将其设置在快照中的“编译器”选项卡中。 Then, you'll have to associated crosscompiler and Qt build in a complete Kit in the "Kit" tab you see there in Qt Creator. 然后,您将必须在Qt Creator中看到的“工具包”选项卡中将交叉编译器和Qt关联到完整的工具包中。 You'll also have to set a proper sysroot, containing all the libs from your arm system. 您还必须设置一个正确的sysroot,其中包含来自arm系统的所有库。

The other option, as suggested by others, is to build on your own. 正如其他人建议的那样,另一种选择是自己构建。 It is probably the best option as Qt depends on many other system components and the build must be compatible with that. 这可能是最好的选择,因为Qt依赖于许多其他系统组件,并且构建必须与此兼容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM