红联Linux门户
Linux帮助

QT编译出错

发布时间:2011-05-16 21:29:04来源:红联作者:captain_chaoge
嵌入式版本的QT已经安装成功,在编译测试程序hello world时出现以下错误:
# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.5.1-arm/mkspecs/linux-g++ -I. -I
/usr/local/Trolltech/QtEmbedded-4.5.1-arm/include/QtCore -I/usr/local/Trolltech/
QtEmbedded-4.5.1-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.5.1-arm/i
nclude -I. -I. -I. -o main.o main.cpp
g++ -Wl,-O1 -o Trial main.o -L/usr/lib -lQtGui -L/usr/local/Trolltech/QtEmbed
ded-4.5.1-arm/lib -lQtNetwork -lQtCore -lm -lrt -ldl -lpthread
/usr/bin/ld: warning: libstdc++.so.5, needed by /usr/lib/libQtGui.so, not found
(try using -rpath or -rpath-link)
/usr/lib/libQtGui.so: undefined reference to `vtable for __cxxabiv1::__vmi_class
_type_info@GLIBCPP_3.2'
/usr/lib/libQtGui.so: undefined reference to `operator delete[](void*)@GLIBCPP_3
.2'
/usr/lib/libQtGui.so: undefined reference to `operator delete(void*)@GLIBCPP_3.2
'
/usr/lib/libQtGui.so: undefined reference to `vtable for __cxxabiv1::__si_class_
type_info@GLIBCPP_3.2'
/usr/lib/libQtGui.so: undefined reference to `operator new[](unsigned int)@GLIBC
PP_3.2'
/usr/lib/libQtCore.so: undefined reference to `__builtin_exit'
/usr/lib/libQtGui.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.2'
/usr/lib/libQtGui.so: undefined reference to `vtable for __cxxabiv1::__class_typ
e_info@GLIBCPP_3.2'
/usr/lib/libQtGui.so: undefined reference to `operator new(unsigned int)@GLIBCPP
_3.2'
collect2: ld returned 1 exit status
make: *** [Trial] Error 1

望高手指教,谢谢!
文章评论

共有 4 条评论

  1. gjjd_gl 于 2011-05-18 08:22:48发表:

    那就好

  2. captain_chaoge 于 2011-05-17 21:21:15发表:

    编译器问题 已解决 谢谢

  3. tiany524 于 2011-05-16 21:43:25发表:

    linux下QtE开发环境的搭建
    http://blog.csdn.net/tiany524/archive/2011/03/10/6238010.aspx

  4. tiany524 于 2011-05-16 21:42:35发表:

    什么系统
    一边linux有自己的qt
    用qmake -v 看看是否是你装的armqt目录