天嵌 ARM开发社区

 找回密码
 注册
查看: 1717|回复: 1

Qt应用程序开发问题

[复制链接]
lll0816 发表于 2010-11-28 20:53:24 | 显示全部楼层 |阅读模式
按照手册完成第一个测试程序的开发流程后,编译出现下面的错误:


[root@lll first]# make
g++  -o /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first first.o main.o first.o   -L/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/lib -L/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/lib -lqpe -lqtopia -lqte
first.o: In function `first::event(QEvent*)':
first.cpp:(.text+0x0): multiple definition of `first::event(QEvent*)'
first.o:first.cpp:(.text+0x0): first defined here
first.o: In function `non-virtual thunk to first::~first()':
first.cpp:(.text+0x130): multiple definition of `non-virtual thunk to first::~first()'
first.o:first.cpp:(.text+0x130): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0x140): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0x140): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0x160): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0x160): first defined here
first.o: In function `non-virtual thunk to first::~first()':
first.cpp:(.text+0x180): multiple definition of `non-virtual thunk to first::~first()'
first.o:first.cpp:(.text+0x180): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0x190): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0x190): first defined here
first.o: In function `first::user_button()':
first.cpp:(.text+0x1c0): multiple definition of `first::user_button()'
first.o:first.cpp:(.text+0x1c0): first defined here
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x240): multiple definition of `first::first(QWidget*, char const*, unsigned int)'
first.o:first.cpp:(.text+0x240): first defined here
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x680): multiple definition of `first::first(QWidget*, char const*, unsigned int)'
first.o:first.cpp:(.text+0x680): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0x148): undefined reference to `vtable for first'
first.cpp:(.text+0x14f): undefined reference to `vtable for first'
first.o: In function `first::~first()':
first.cpp:(.text+0x168): undefined reference to `vtable for first'
first.cpp:(.text+0x16f): undefined reference to `vtable for first'
first.o: In function `first::~first()':
first.cpp:(.text+0x19c): undefined reference to `vtable for first'
first.o:first.cpp:(.text+0x1a3): more undefined references to `vtable for first' follow
first.o: In function `first::user_button()':
first.cpp:(.text+0x1ef): undefined reference to `first::tr(char const*)'
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x26d): undefined reference to `vtable for first'
first.cpp:(.text+0x274): undefined reference to `vtable for first'
first.cpp:(.text+0x2a5): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x38f): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x47c): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x584): undefined reference to `first::tr(char const*)'
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x6ad): undefined reference to `vtable for first'
first.cpp:(.text+0x6b4): undefined reference to `vtable for first'
first.cpp:(.text+0x6e5): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x7cf): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x8bc): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x9c4): undefined reference to `first::tr(char const*)'
first.o: In function `first::~first()':
first.cpp:(.text+0x148): undefined reference to `vtable for first'
first.cpp:(.text+0x14f): undefined reference to `vtable for first'
first.o: In function `first::~first()':
first.cpp:(.text+0x168): undefined reference to `vtable for first'
first.cpp:(.text+0x16f): undefined reference to `vtable for first'
first.o: In function `first::~first()':
first.cpp:(.text+0x19c): undefined reference to `vtable for first'
first.o:first.cpp:(.text+0x1a3): more undefined references to `vtable for first' follow
first.o: In function `first::user_button()':
first.cpp:(.text+0x1ef): undefined reference to `first::tr(char const*)'
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x26d): undefined reference to `vtable for first'
first.cpp:(.text+0x274): undefined reference to `vtable for first'
first.cpp:(.text+0x2a5): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x38f): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x47c): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x584): undefined reference to `first::tr(char const*)'
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x6ad): undefined reference to `vtable for first'
first.cpp:(.text+0x6b4): undefined reference to `vtable for first'
first.cpp:(.text+0x6e5): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x7cf): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x8bc): undefined reference to `first::tr(char const*)'
first.cpp:(.text+0x9c4): undefined reference to `first::tr(char const*)'
collect2: ld 返回 1
make: *** [/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first] 错误 1


那一步出错了呢?
天嵌_support1 发表于 2010-11-29 18:56:52 | 显示全部楼层
1# lll0816


不知道了。
用QT4吧,网友。
你这个测试程序创建的步骤繁杂。
用QT4吧,它的开发工具也简洁很多
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-28 01:22 , Processed in 1.013711 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表