1、下载Qt源码,archive/qt/5.12/5.12.8/single/qt-everywhere-src-5.12.8.tar.xz
2、安装依赖库:
sudo apt-get install flex sudo apt-get install bison sudo apt-get install gperf sudo apt-get install build-essential sudo apt-get install libgl1-mesa-dev sudo apt-get install libglu1-mesa-dev sudo apt-get install libegl1-mesa-dev sudo apt-get install freeglut3-dev
3、解压后,qt-everywhere-src-5.12.8目录下mkdir目录build,cd到build目录,执行confiure命令:
./../configure -release -prefix ../Qt5.12.8
4、执行命令:
sudo make
报错:error: #error Target architecture was not detected as supported by Double-Conversion.
报错的文件为qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
解决方法:打开utils.h文件,添加defined(__loongarch__) ||
参考:https://blog.csdn.net/yeflx/article/details/124711915
报错:cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses precision [-fpermissive] u.asBits.payload = reinterpret_cast<int32_t>(ptr);
解决方法:把int32_t改为int64_t
参考:https://blog.csdn.net/a137748099/article/details/120227462
5、执行命令:
sudo make install
标签:Qt,龙芯,get,sudo,apt,5.12,源码,dev,install From: https://www.cnblogs.com/tingtaishou/p/17387763.html