Versión del software
Cadena de herramientas de compilación cruzada: gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
Versión de Qt: qt-everywhere-src-5.12.9.tar.xz
Versión de Ubuntu: ubuntu-22.04. 2 -escritorio-amd64.iso
Descomprimir directorio
/home/qsqya/compile/qt5.12.9/qt-everywhere-src-5.12.9
/opt/arm-none-linux-gnueabihf-9.2
Configuración del entorno
- Abra una ventana de línea de comando y configure las variables de entorno (temporales)
export PATH=/opt/arm-none-linux-gnueabihf-9.2/bin:$PATH
- Modifique el archivo de configuración
/home/qsqya/compile/qt5.12.9/qt-everywhere-src-5.12.9/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
y reemplace el siguiente contenido
:%s#arm-linux-gnueabi#arm-none-linux-gnueabihf#g
- Escriba el script de compilación
/home/qsqya/compile/qt5.12.9/compile.sh
#!/bin/sh
cd ./qt-everywhere-src-5.12.9
./configure -prefix /home/qsqya/compile/qt5.12.9/build \
-opensource \
-release \
-confirm-license \
-xplatform linux-arm-gnueabi-g++ \
-shared \
-nomake examples \
-nomake tests \
-no-opengl
Modifique la ruta usted mismo
4. Ejecute el script
./compile.sh
make -j 4 ##编译
make install ##安装
pregunta
- Mensaje de error (5.9.9)
3:38: error: ‘numeric_limits’ is not a member of ‘std’
103 | const auto uchar_max = (std::numeric_limits<uchar>::max)();
Solución:
qtbase/src/corelib/tools/qbytearraymatcher.h
#include <QtCore/qbytearray.h>
+#include <limits>
- Mensaje de error
/home/qsqya/compile/qt5.12.9/qt-everywhere-src-5.12.9/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:35: error: ‘numeric_limits’ is not a member of ‘std’
331 | {
return QSpecialInteger(std::numeric_limits<T>::max()); }
Solución
#include <QtCore/qfloat16.h>
#include <QtCore/qglobal.h>
+#include <limits>
- Mensaje de error
/home/qsqya/compile/qt5.12.9/qt-everywhere-src-5.12.9/qtbase/src/corelib/tools/qbytearraymatcher.h:103:38: error: ‘numeric_limits’ is not a member of ‘std’
103 | const auto uchar_max = (std::numeric_limits<uchar>::max)();
Solución
#include <QtCore/qbytearray.h>
+#include <limits>
- Mensaje de error, error informado durante la fase de creación
/home/qsqya/compile/qt5.12.9/qt-everywhere-src-5.12.9/qtbase/src/corelib/kernel
Solución
#include <QtCore/qobject.h>
#ifndef QT_BOOTSTRAPPED
#include <QtCore/qbytearraylist.h>
#endif
+#include <limits>