主题 : qt4 编译时make 问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 24338
精华: 0
发帖: 5
金钱: 25 两
威望: 5 点
综合积分: 10 分
注册时间: 2010-07-06
最后登录: 2010-08-12
楼主  发表于: 2010-07-17 10:19

 qt4 编译时make 问题

我用的是 vmware+fedora9.0 用qt4传建了一个buttom.ui的文件
用uic3  -i buttom.h -o buttom.ccp buttom.ui
   qmake -project buttom.pro
   qmake -o Makefile  buttom.pro
都可以正常
但是用make的时候出现如下错误:
[root@localhost hello]# make
g++ -c -pipe -Wall -W -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables  -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o hello.o hello.cpp
hello.cpp: In constructor ‘hello::hello(QWidget*, const char*, bool, uint)’:
hello.cpp:27: 错误:invalid use of incomplete type ‘struct QDialogButtonBox’
hello.h:19: 错误:forward declaration of ‘struct QDialogButtonBox’
hello.cpp:28: 错误:invalid use of incomplete type ‘struct QDialogButtonBox’
hello.h:19: 错误:forward declaration of ‘struct QDialogButtonBox’
hello.cpp:29: 错误:invalid use of incomplete type ‘struct QDialogButtonBox’
hello.h:19: 错误:forward declaration of ‘struct QDialogButtonBox’
hello.cpp:29: 错误:嵌套名指定中使用了不完全的类型‘QDialogButtonBox’
make: *** [hello.o] 错误 1
问题如何解决呀?请高手指教!
级别: 新手上路
UID: 24338
精华: 0
发帖: 5
金钱: 25 两
威望: 5 点
综合积分: 10 分
注册时间: 2010-07-06
最后登录: 2010-08-12
1楼  发表于: 2010-07-17 10:21
以前项目的名称是hello.pro 后改为buttom.pro