首页| 论坛| 消息

标题:请教qt编译问题
作者:baojian_322
日期:2006-11-13 21:30
内容:

我用的是redhat9.0,自带的qt-3.1,刚开始使用,想那个简单程序先运行一下,
当我使用qtdesigner编辑好程序后,运行出现错误,请各位指教。hehe.pro是工程的名字
$ qmake hehe.pro
$ make
g++ -c -pipe -Wall -W -O2 -march=i386 -mcpu=i686 -g -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions-DQT_NO_DEBUG -I/usr/lib/qt-3.1/mkspecs/default -I. -I/usr/lib/qt-3.1/include -I.ui/ -I.moc/ -o .obj/main.o main.cpp
main.cpp: In function `int main(int, char**)':
main.cpp:8: `QPushButtton' undeclared (first use this function)
main.cpp:8: (Each undeclared identifier is reported only once for each function
it appears in.)
main.cpp:8: parse error before `(' token
main.cpp:9: `hellobtn' undeclared (first use this function)
make: *** [.obj/main.o] Error
下面是我的程序:
#include
#include
int main( int argc,char **argv)
{
QApplication a(argc,argv);

QPushButton hellobtn("hello world!",0);
hellobtn.resize(100,20);
a.setMainWidget(&hellobtn);
hellobtn.show();
return a.exec();
}


#1 [shiroki 11-16 18:33]
`QPushButtton' 这里怎么多了个t亚
#2 [baojian_322 11-16 20:35]
谢谢您的回复,就是呀,怎么多个“t" 呢 ,我还没有发现呢,但是这是什么问题呢,这是我运行make后得出的结果,不是我编辑的问题,还请各位指教!!谢谢!
#3 [XChinux 11-16 22:26]
奇怪的现象,只能重新自己检查一回了。

回复 发表
主题 版块