lazarus下编译QT5

发布时间 2023-12-27 20:14:47作者: 禁卫军

用Lazarus自带的libQt5Pas.so无法通过编译。主要是在高于2.2.0版本的Lazarus时要用到libQt5Pas.so库要大于1.2.10才能编译。

方法一:到Release V1.2.15 · libqt5pas (github.com)下载对应操作系统与CPU的库文件。

方法二:有的CPU或操作系统没有下载。就只有自己编译了。比如Loongarch就没有

1、下载https://github.com/davidbannon/libqt5pas/archive/refs/tags/v1.2.15.zip

2、解压文件

3、编译

su 

cd 解压目录

cd cbindings

qmake -query 查看qt5
qmake  出错按注意中的包安装
 make
 make install
 make clean

注意:编译libqt5pas时要安装 qt5-make c++ make qtbase5-dev libqt5x11extras5 libqt5x11extras5-dev。在运行主机上要拷贝libQt5Pas.so.1.2.14和libQt5X11Extras.so.5个文件。