我在我的 Mac 上的 QT Creator 中制作了一个完整的应用程序(经过测试和工作),现在需要将源代码移动到我的 Ubuntu 机器上,并在 ubuntu 中的 QT Creator 中重新编译它。
这个问题是项目一打开我就在“常规消息”日志中收到此错误
项目错误:QT 中的未知模块:串行端口
所以我假设 QSerialport 不包含在 QT Creator 的 ubuntu 版本中。
我尝试使用从安装 QSerialport 的教程中获得的这些终端命令自己获取它(我根本不了解 Linux,这是我第一次使用它)。
git 克隆 git://code.qt.io/qt/qtserialport.git
cd qtserialport
git checkout qt5.x.y
这就是我陷入困境的地方。我尝试用“x”和“y”替换每个数字,结果表明找不到这样的文件。
我犯了一些简单的错误吗?有人必须这样做吗?
最佳答案
亲自尝试一下:
git clone git://code.qt.io/qt/qtserialport.git
mkdir qtserialport-build
cd qtserialport-build
qmake ../qtserialport/qtserialport.pro
sudo make install
关于linux - 在 Ubuntu 中使用 QSerialport 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34758196/