各位大侠 小弟用arm-none-linux-gnueabi交叉编译器,去编译一个qt程序,并配置好了用于交叉编译的makefile
但出现了下面的错误(但当用gcc 编译时能在pc机上运行,没有以下错误)
zhuti.cpp:616: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:617: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:617: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:618: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:619: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:620: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:668: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:669: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:670: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:671: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:672: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:682: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:683: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:684: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:685: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:686: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:695: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:696: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:697: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:698: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:699: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:704: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:705: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:706: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:707: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:763: warning: deprecated conversion from string constant to 'char*'
zhuti.cpp:776: error: no matching function for call to 'zhuti::connect(QDial*&, const char [19], QLCDNumber*&, const char [14])'
/opt/qte/qte-3.3.1/include/qobject.h:116: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*)
/opt/qte/qte-3.3.1/include/qobject.h:226: note: bool QObject::connect(const QObject*, const char*, const char*) const
zhuti.cpp:777: error: no matching function for call to 'zhuti::connect(QDial*&, const char [19], QLCDNumber*&, const char [14])'
/opt/qte/qte-3.3.1/include/qobject.h:116: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*)
/opt/qte/qte-3.3.1/include/qobject.h:226: note: bool QObject::connect(const QObject*, const char*, const char*) const
zhuti.cpp: In member function 'virtual void zhuti::languageChange()':
zhuti.cpp:823: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:835: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:836: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:837: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:838: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:839: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:840: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:841: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:842: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:843: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:844: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp: In member function 'void zhuti::save()':
zhuti.cpp:915: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp: In member function 'void zhuti::timer_1()':
zhuti.cpp:1104: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1107: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1109: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1121: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1122: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1129: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1134: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1138: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
make: *** [zhuti.o] 错误 1zhuti.cpp:841: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp:842: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp: In member function 'void zhuti::save()':
zhuti.cpp:913: error: invalid use of incomplete type 'struct QTable'
/opt/qte/qte-3.3.1/include/qheader.h:51: error: forward declaration of 'struct QTable'
zhuti.cpp: In member function 'void zhuti::timer_1()':
zhuti.cpp:1102: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1105: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1107: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1119: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1132: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
zhuti.cpp:1136: error: invalid use of incomplete type 'struct QDial'
zhuti.h:95: error: forward declaration of 'struct QDial'
make: *** [zhuti.o] 错误 1
这说是前向引用声明的问题,并按照这论坛一哥们说的 把#include <qtable>和class QTable 调换了下位置 但依然是错误
望各位路过大侠多多指教 感激涕零!!!!