|
按照手册完成第一个测试程序的开发流程后,编译出现下面的错误:
[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
那一步出错了呢? |
|