• 6310阅读
  • 4回复

【提问】各位qtopia高手,请教一个问题 [复制链接]

上一主题 下一主题
离线wlg7705
 

只看楼主 倒序阅读 楼主  发表于: 2005-09-03
【提问】各位qtopia高手,请教一个问题
我写了一个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重新编辑 ]
离线XChinux

只看该作者 1楼 发表于: 2005-09-03
是不是你类定义不正确?上面那么多undefined reference
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
离线ryan
只看该作者 2楼 发表于: 2005-09-09
1. make clean
2. 设置好环境变量,然后重新生成 你的helloform.
和cpp文件, tmake -
Makefile *.pro
3. make

主要问题应该是你的Makefile和使用的uic,moc,tmake是不是兼容这个qte版本.
离线olivercheung

只看该作者 3楼 发表于: 2008-05-15
我也遇到了类似的问题,能说详细点吗
离线shiroki

只看该作者 4楼 发表于: 2008-05-20
附件在哪儿呢?
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
快速回复
限100 字节
 
上一个 下一个