标题:编译出错:libqte.so
作者:aliya
日期:2006-12-26 14:41
内容:
根据友善的光盘,提供的资料,编译了qt-embedded-2.3.7 .qt-x11.2.3.3 qtopia- 1.7,tmake等文件,然后编译hello例子,没有出错.
所以自己写了个例子,
#include
#include
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
a.setMainWidget( &hello );
hello.show();
return a.exec();
}
这是http://www.qiliang.net/qt/tutorial1-01.html的标准例子,但是编译出现错误:
/friendly-arm/x88-qtopia/qt/lib/libqte.so:undefined reference to 'operator new[](unsigned)'
等错误,所出的错误全部源于:libqte.so这个文件
请问这是什么原因?
#1 [shiroki 01-15 08:26]
把编译的命令换成g++就行了,好像原来是用gcc编译的,默认没有链接c++的库。