• 5074阅读
  • 2回复

求助!编译HELLO时候出错!!不胜感谢!! [复制链接]

上一主题 下一主题
离线nanawoaini
 
只看楼主 倒序阅读 楼主  发表于: 2006-03-29
我在编译HELLO的时候出现下边问题怎么也解决不了,请各位高手指点一下,先谢过拉!!

执行MAKE后报错如下:


gcc -o counter counter.o main.o mainwindow.o moc_counter.o moc_mainwindow.o -L/armsys2410/qt_x86/qt/lib -lqte
counter.o(.text+0x39): In function `Counter::Counter[not-in-charge](QWidget*, char const*)':
: undefined reference to `operator new(unsigned)'
counter.o(.text+0xf5): In function `Counter::Counter[in-charge](QWidget*, char const*)':
: undefined reference to `operator new(unsigned)'
main.o(.text+0x24): In function `main':
: undefined reference to `operator new(unsigned)'
mainwindow.o(.text+0x8b): In function `MainWindow::MainWindow[not-in-charge](QWidget*, char const*)':
: undefined reference to `operator new(unsigned)'
mainwindow.o(.text+0x100): In function `MainWindow::MainWindow[not-in-charge](QWidget*, char const*)':
: undefined reference to `operator new(unsigned)'
mainwindow.o(.text+0x175): more undefined references to `operator new(unsigned)' follow
moc_counter.o(.gnu.linkonce.t._ZN7CounterD0Ev+0x28): In function `Counter::~Counter [in-charge deleting]()':
: undefined reference to `operator delete(void*)'
moc_mainwindow.o(.gnu.linkonce.t._ZN10MainWindowD0Ev+0x28): In function `MainWindow::~MainWindow [in-charge deleting]()':
: undefined reference to `operator delete(void*)'
/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `operator new[](unsigned)'
/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `cos'
/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `sin'
/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `__cxa_pure_virtual'/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `pow'
/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `operator delete[](void*)'
collect2: ld returned 1 exit status
该如何解决啊!!!
[ 此贴被XChinux在2006-03-29 09:55重新编辑 ]
离线hanrock
只看该作者 1楼 发表于: 2006-03-29
: undefined reference to `operator new(unsigned)'
/armsys2410/qt_x86/qt/lib/libqte.so: undefined reference to `operator new[](unsigned)'

没包含头文件吧,或是编译的库不全
离线nanawoaini
只看该作者 2楼 发表于: 2006-03-29
还需要哪些库呢?我的qt/lib里只有libqte.so还该加哪些呢,望赐教
快速回复
限100 字节
 
上一个 下一个