用qt designer 生成了 .ui文件
然后运用.ui文件,# uic -o *.h *.ui
# uic -o *.cpp -impl *.h *.ui
生成了. cpp 和 .h文件
编辑了mian.cpp 然后用友善hello里面的./build 编译
这个是整个包
err.rar (3 K) 下载次数:11 提示下列错误
[root@localhost first]# ./build
WARNING: Found potential symbol conflict of first.cpp (first.cpp) in SOURCES
WARNING: Found potential symbol conflict of first.h (first.h) in HEADERS
Makefile:177: warning: overriding commands for target `.obj/release-shared/first.o'
Makefile:162: warning: ignoring old commands for target `.obj/release-shared/first.o'
Makefile:183: warning: overriding commands for target `.obj/release-shared/moc_first.o'
Makefile:180: warning: ignoring old commands for target `.obj/release-shared/moc_first.o'
Makefile:189: warning: overriding commands for target `.moc/release-shared/moc_first.cpp'
Makefile:186: warning: ignoring old commands for target `.moc/release-shared/moc_first.cpp'
rm -f .obj/release-shared/moc_first.o .obj/release-shared/moc_first.o
rm -f .moc/release-shared/moc_first.cpp .moc/release-shared/moc_first.cpp
rm -f .ui/release-shared/first.cpp .ui/release-shared/first.h
rm -f .obj/release-shared/first.o .obj/release-shared/main.o .obj/release-shared/first.o
rm -f *~ core *.core
Makefile:177: warning: overriding commands for target `.obj/release-shared/first.o'
Makefile:162: warning: ignoring old commands for target `.obj/release-shared/first.o'
Makefile:183: warning: overriding commands for target `.obj/release-shared/moc_first.o'
Makefile:180: warning: ignoring old commands for target `.obj/release-shared/moc_first.o'
Makefile:189: warning: overriding commands for target `.moc/release-shared/moc_first.cpp'
Makefile:186: warning: ignoring old commands for target `.moc/release-shared/moc_first.cpp'
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic first.ui -o .ui/release-shared/first.h
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic first.ui -i first.h -o .ui/release-shared/first.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"first\" -DQTOPIA_TRTARGET=\"first\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/first.o .ui/release-shared/first.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"first\" -DQTOPIA_TRTARGET=\"first\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/main.o main.cpp
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/moc .ui/release-shared/first.h -o .moc/release-shared/moc_first.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"first\" -DQTOPIA_TRTARGET=\"first\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/moc_first.o .moc/release-shared/moc_first.cpp
test -d /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/ || mkdir -p /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/
g++ -o /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/first .obj/release-shared/first.o .obj/release-shared/main.o .obj/release-shared/first.o .obj/release-shared/moc_first.o .obj/release-shared/moc_first.o -lqtopia2 -lqtopia -lqpe -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/lib -lqte
.obj/release-shared/first.o: In function `first::push()':
first.cpp:(.text+0x0): multiple definition of `first::push()'
.obj/release-shared/first.o:first.cpp:(.text+0x0): first defined here
.obj/release-shared/first.o: In function `non-virtual thunk to first::~first()':
first.cpp:(.text+0x10): multiple definition of `non-virtual thunk to first::~first()'
.obj/release-shared/first.o:first.cpp:(.text+0x10): first defined here
.obj/release-shared/first.o: In function `first::~first()':
first.cpp:(.text+0x18): multiple definition of `first::~first()'
.obj/release-shared/first.o:first.cpp:(.text+0x18): first defined here
.obj/release-shared/first.o: In function `first::~first()':
first.cpp:(.text+0x32): multiple definition of `first::~first()'
.obj/release-shared/first.o:first.cpp:(.text+0x32): first defined here
.obj/release-shared/first.o: In function `non-virtual thunk to first::~first()':
first.cpp:(.text+0x4b): multiple definition of `non-virtual thunk to first::~first()'
.obj/release-shared/first.o:first.cpp:(.text+0x4b): first defined here
.obj/release-shared/first.o: In function `first::~first()':
first.cpp:(.text+0x52): multiple definition of `first::~first()'
.obj/release-shared/first.o:first.cpp:(.text+0x52): first defined here
.obj/release-shared/first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x7e): multiple definition of `first::first(QWidget*, char const*, unsigned int)'
.obj/release-shared/first.o:first.cpp:(.text+0x7e): first defined here
.obj/release-shared/first.o: In function `first::first(QWidget*, char const*, unsigned int)':
first.cpp:(.text+0x2b6): multiple definition of `first::first(QWidget*, char const*, unsigned int)'
.obj/release-shared/first.o:first.cpp:(.text+0x2b6): first defined here
.obj/release-shared/moc_first.o: In function `first::className() const':
moc_first.cpp:(.text+0x0): multiple definition of `first::className() const'
.obj/release-shared/moc_first.o:moc_first.cpp:(.text+0x0): first defined here
.obj/release-shared/moc_first.o: In function `first::staticMetaObject()':
moc_first.cpp:(.text+0x2a): multiple definition of `first::staticMetaObject()'
.obj/release-shared/moc_first.o:moc_first.cpp:(.text+0x2a): first defined here
.obj/release-shared/moc_first.o:(.bss+0x0): multiple definition of `first::metaObj'
.obj/release-shared/moc_first.o:(.bss+0x0): first defined here
.obj/release-shared/moc_first.o: In function `first::tr(char const*, char const*)':
moc_first.cpp:(.text+0xaa): multiple definition of `first::tr(char const*, char const*)'
.obj/release-shared/moc_first.o:moc_first.cpp:(.text+0xaa): first defined here
.obj/release-shared/moc_first.o: In function `first::tr(char const*)':
moc_first.cpp:(.text+0xd4): multiple definition of `first::tr(char const*)'
.obj/release-shared/moc_first.o:moc_first.cpp:(.text+0xd4): first defined here
.obj/release-shared/moc_first.o: In function `first::initMetaObject()':
moc_first.cpp:(.text+0xfe): multiple definition of `first::initMetaObject()'
.obj/release-shared/moc_first.o:moc_first.cpp:(.text+0xfe): first defined here
collect2: ld returned 1 exit status
make: *** [/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/first] Error 1
[root@localhost first]#
[ 此帖被douzidouer在2010-01-16 08:46重新编辑 ]