|
本帖最后由 wzq204 于 2010-6-13 10:58 编辑
我仿照兲嵌科技出品--QT程序开发完全手册(上).pdf的文档的第三章,开发了第一个应用程序,发现执行到3.9(编译并仿真),出现了编译错误。不知道,怎么解决。
[root@EmbedSky first]# make
Makefile:130: warning: overriding commands for target `moc_first.cpp'
Makefile:127: warning: ignoring old commands for target `moc_first.cpp'
g++ -o /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first first.o main.o first.o moc_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::user_button()':
first.cpp:(.text+0x0): multiple definition of `first::user_button()'
first.o:first.cpp:(.text+0x0): first defined here
first.o: In function `first::event(QEvent*)':
first.cpp:(.text+0x10): multiple definition of `first::event(QEvent*)'
first.o:first.cpp:(.text+0x10): first defined here
first.o: In function `non-virtual thunk to first::~first()':
first.cpp:(.text+0x100): multiple definition of `non-virtual thunk to first::~first()'
first.o:first.cpp:(.text+0x100): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0x110): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0x110): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0x130): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0x130): first defined here
first.o: In function `non-virtual thunk to first::~first()':
first.cpp:(.text+0x150): multiple definition of `non-virtual thunk to first::~first()'
first.o:first.cpp:(.text+0x150): 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 `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x190): multiple definition of `first::first(QWidget*, char const*, unsigned int)'
first.o:first.cpp:(.text+0x190): first defined here
first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x590): multiple definition of `first::first(QWidget*, char const*, unsigned int)'
first.o:first.cpp:(.text+0x590): first defined here
collect2: ld returned 1 exit status
make: *** [/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first] Error 1
[root@EmbedSky first]# arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/maxim/arm-lite/src-4.3-arm-none-linux-gnueabi-lite/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}' --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2009q1-176' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/libc --with-gmp=/scratch/maxim/arm-lite/obj-4.3-arm-none-linux-gnueabi-lite/host-libs-2009q1-176-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/maxim/arm-lite/obj-4.3-arm-none-linux-gnueabi-lite/host-libs-2009q1-176-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176)
[root@EmbedSky first]# |
|