5、树莓派的通信:安装qt5、qt5编写串口通信程序,测试串口数据收发,
1、qt5提供了串口类,所以要安装qt5,共有190M左右。慢的要死。
git clone git://code.qt.io/qt/qtbase.git
也可以在下载qtbase.tar.gz,共260M左右。速度快。
cd /home/pi/soft/qt5/
解压tar -zxvf qtbase.tar.gz
得到qtbase文件夹
2、编译和安装qt5,先su一下,
cd qtbase
./configure -opensource -confirm-license -qreal float -fully-process -no-c++11 -nomake tests -nomake examples -make libs -prefix /opt/qt5
有个参数有错,使用下面的命令。
./configure -opensource -confirm-license -qreal float -no-c++11 -nomake tests -nomake examples -make libs -prefix /opt/qt5
make all && make install
文章来自:http://www.cnblogs.com/bhss/p/4998312.html