我写了一个qtopia的应用程序,源码见附件,make提示错误如下:
ls
hello_base.cpp hello_base.ui hello.desktop hello.pro Makefile
hello_base.h hello.cpp hello.h main.cpp Makefile.in
[root@wlg hello]# make
gcc -L/friendly-arm/x86-qtopia/qtopia/lib -Wl,-rpath,/friendly-arm/x86-qtopia/qtopia/lib -L/friendly-arm/x86-qtopia/qt/lib -Wl,-rpath,/friendly-arm/x86-qtopia/qt/lib -o /friendly-arm/x86-qtopia/qtopia/bin/hello .obj/linux-generic-g++//hello.o .obj/linux-generic-g++//main.o .obj/linux-generic-g++//hello_base.o .obj/linux-generic-g++//moc_hello_base.o -lqpe -lqtopia -lqte
.obj/linux-generic-g++//hello.o(.text+0x19): In function `HelloForm::HelloForm[not-in-charge](QWidget*, char const*, unsigned)':
: undefined reference to `vtable for HelloForm'
.obj/linux-generic-g++//hello.o(.text+0x20): In function `HelloForm::HelloForm[not-in-charge](QWidget*, char const*, unsigned)':
: undefined reference to `vtable for HelloForm'
.obj/linux-generic-g++//hello.o(.text+0x45): In function `HelloForm::HelloForm[in-charge](QWidget*, char const*, unsigned)':
: undefined reference to `vtable for HelloForm'
.obj/linux-generic-g++//hello.o(.text+0x4c): In function `HelloForm::HelloForm[in-charge](QWidget*, char const*, unsigned)':
: undefined reference to `vtable for HelloForm'
.obj/linux-generic-g++//hello.o(.text+0x63): In function `HelloForm::~HelloForm [not-in-charge]()':
: undefined reference to `vtable for HelloForm'
.obj/linux-generic-g++//hello.o(.text+0x6a): more undefined references to `vtable for HelloForm' follow
.obj/linux-generic-g++//hello.o(.text+0x205): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
.obj/linux-generic-g++//hello.o(.text+0x230): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
collect2: ld returned 1 exit status
make: *** [/friendly-arm/x86-qtopia/qtopia/bin/hello] Error 1
[root@wlg hello]#
请大家指点一下,不胜感激!
[ 此贴被XChinux在2005-09-03 10:38重新编辑 ]