Qt出现 error: undefined reference to `__imp__ZN11QSerialPortC1EP7QObject' 解决方法:在pro文件中加入 QT += serialport 重新构建即可。