使用的库是是qte3.3.4,如下:
g++ main.cpp -I/home/qte_334/include -L/home/qte_334/lib -lqte-mt -o main
输出错误如下:
(.rodata_ZT16QGList[typeinfo for QGList]+0x8]) undefined reference to 'typeinfo for QPtrCollection'
不知是什么原因?
程序源代码如下:
#include <qapplication.h>
#include <qpushbutton.h>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton *button=new QPushButton("Quit", 0);
app.SetMainWidget(button);
button->show();
return app.exec();
}