• 5309阅读
  • 1回复

新手在QT编译的时候出的问题,急求高手解决! [复制链接]

上一主题 下一主题
离线kimi
 
只看楼主 倒序阅读 楼主  发表于: 2010-11-06
— 本帖被 XChinux 执行加亮操作(2010-11-10) —
在编辑helloqt中,代码是抄书上的,应该没问题的,但是编译过程中出现如下问题:

wyk3.cpp:2:22: error: QpushButton: 没有那个文件或目录
wyk3.cpp:3: error: conflicting declaration ‘int** argc’
wyk3.cpp:3: error: ‘argc’ has a previous declaration as ‘int argc’
wyk3.cpp:3: warning: ‘int main(int)’ takes only zero or two arguments
wyk3.cpp: In function ‘int main(int)’:
wyk3.cpp:5: error: ‘argv’ was not declared in this scope
wyk3.cpp:5: error: ‘QPushbutton’ was not declared in this scope
wyk3.cpp:5: error: expected ‘;’ before ‘pushbutton’
wyk3.cpp:6: error: ‘pushButton’ was not declared in this scope
wyk3.cpp:7: error: ‘Q0bject’ has not been declared

我敲的代码是:
#include<QApplication>
#include<QpushButton>
int main(int argc,char *argc[])
{
QApplication app(argc,argv); 
QPushbutton pushbutton(Q0bject::tr("hello Qt!"));
pushButton.show();
Q0bject::connect(&pushButton,SIGNAL(clicked()),&app,SLOT(quit()));
return app.exec();
}
离线dbzhang800

只看该作者 1楼 发表于: 2010-11-07
恩,因为你抄书抄错了。注意:linux下是区分大小写的!
快速回复
限100 字节
 
上一个 下一个