qt程序运行时的错误error:undefined reference to `_imp___ZN10QTcpSocketD1Ev'

2018/04/24 21:20
阅读数 1.9K
出现的错误:
  undefined reference to `_imp___ZN10QTcpSocketD1Ev'
  undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
  undefined reference to `_imp___ZN10QTcpSocketD1Ev'
  undefined reference to `_imp___ZN10QTcpSocketD1Ev'
  undefined reference to `_imp___ZN10QTcpSocketD1Ev'
  undefined reference to `_imp___ZN10QTcpSocketD1Ev'
  undefined reference to `_imp___ZN10QTcpSocketD1Ev'
  undefined reference to `_imp___ZN15QAbstractSocket13connectToHostERK7QStringt6QFlagsIN9QIODevice12OpenModeFlagEE'
  undefined reference to `_imp___ZN15QAbstractSocket5closeEv'

  collect2: ld returned 1 exit status

解决方法:
链接错误,检查.pro文件中是否缺少
   QT += network
 
展开阅读全文
qt
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部