[linux+openscada+qt]could not read symbols: File in wrong format

1. 添加头文件路径QtNetwork。

  • QtWebKit_CFLAGS = -DQT_SHARED -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui  -I/usr/include/qt4/QtNetwork  
  • QtWebKit_LIBS =

2. modbus_daq.cpp添加了对QNetworkAccessManager的引用,添加编译参数。

  • daq_ModBus_la_CXXFLAGS = ${QtWebKit_CFLAGS}

3. 库文件路径及库文件。

    LDFLAGS = -L/usr/lib/i386-linux-gnuLIBOBJS =LIBS = -lQtWebKit -lQtGui -lQtNetwork -lQtCore

4. 如何确定QT库文件路径。因为本地装有多个版本的QT,使用find / -name libQtGui.so全局搜索。

>> could not read symbols: File in wrong format

原文地址:https://www.cnblogs.com/Amagasaki/p/3487113.html