新浪微博
腾讯微博
会员列表
统计排行
基本信息
到访IP统计
管理团队
管理统计
在线会员
会员排行
版块排行
帖子排行
标签排行
帮助
下拉
用户名
电子邮箱
用户名
密 码
记住登录
登录
找回密码
注册
快捷通道
关闭
您还没有登录,快捷通道只有在登录后才能使用。
立即登录
还没有帐号? 赶紧
注册一个
首页
论坛
Qt下载
作品展
群组
个人中心
捐赠、管理与开发
邮件订阅
帖子
文章
日志
用户
版块
群组
帖子
搜索
QTCN开发网
>
Qt基础编程
>
QLabel' undeclared (first use this function)
发帖
回复
返回列表
新帖
8103
阅读
4
回复
QLabel' undeclared (first use this function)
[复制链接]
上一主题
下一主题
离线
davalop
UID:74996
注册时间
2009-02-20
最后登录
2009-05-13
在线时间
2小时
发帖
7
搜Ta的帖子
精华
0
金钱
70
威望
8
贡献值
0
好评度
7
访问TA的空间
加好友
用道具
新手上路
关闭
个人中心可以申请新版勋章哦
立即申请
知道了
加关注
发消息
只看楼主
倒序阅读
楼主
发表于: 2009-03-06
— 本帖被 XChinux 执行加亮操作(2009-03-06) —
helloworld.cpp helloworld.pro Makefile
[root@localhost helloworld]# vi Makefile
[root@localhost helloworld]# ls
helloworld.cpp helloworld.pro Makefile
[root@localhost helloworld]# 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. -I/2410s/qtopia/qt-2.3.10/include -o helloworld.o helloworld.cpp
helloworld.cpp:1:24: QApplication: 没有那个文件或目录
helloworld.cpp:2:18: QLabel: 没有那个文件或目录
helloworld.cpp:4: type specifier omitted for parameter `argv[]'
helloworld.cpp: In function `int main(int)':
helloworld.cpp:6: `QApplication' undeclared (first use this function)
helloworld.cpp:6: (Each undeclared identifier is reported only once for each
function it appears in.)
helloworld.cpp:6: parse error before `(' token
helloworld.cpp:7: `QLabel' undeclared (first use this function)
helloworld.cpp:8: `hello' undeclared (first use this function)
helloworld.cpp:9: `app' undeclared (first use this function)
helloworld.cpp:5: warning: unused parameter `int argc'
make: *** [helloworld.o] Error 1
共
条评分
回复
举报
分享到
淘江湖
新浪
QQ微博
QQ空间
开心
人人
豆瓣
网易微博
百度
鲜果
白社会
飞信
离线
davalop
UID:74996
注册时间
2009-02-20
最后登录
2009-05-13
在线时间
2小时
发帖
7
搜Ta的帖子
精华
0
金钱
70
威望
8
贡献值
0
好评度
7
访问TA的空间
加好友
用道具
新手上路
加关注
发消息
只看该作者
1楼
发表于: 2009-03-06
#include <QApplication>
#include <QLabel>
int main(int argc,argv[])
{
QApplication app(argc,argc);
QLabel hello("Hello World");
hello.show();
return app.exec();
}
共
条评分
回复
举报
离线
guoyun_he
UID:24730
注册时间
2007-05-15
最后登录
2023-07-06
在线时间
151小时
发帖
255
搜Ta的帖子
精华
0
金钱
2570
威望
258
贡献值
0
好评度
257
访问TA的空间
加好友
用道具
侠客
加关注
发消息
只看该作者
2楼
发表于: 2009-03-06
你直接给出文件名看看行不行!
共
条评分
回复
举报
离线
浪漫天使
UID:733
注册时间
2005-09-20
最后登录
2013-03-10
在线时间
875小时
发帖
804
搜Ta的帖子
精华
1
金钱
8294
威望
869
贡献值
10
好评度
825
访问TA的空间
加好友
用道具
圣骑士
加关注
发消息
只看该作者
3楼
发表于: 2009-03-06
-I/2410s/qtopia/qt-2.3.10/include
你的是 qt2 ,又想用qt4的游戏规则玩,
不对版啊。。。
共
条评分
回复
举报
离线
wd007
UID:70707
注册时间
2008-12-03
最后登录
2017-01-23
在线时间
490小时
发帖
2557
搜Ta的帖子
精华
2
金钱
25816
威望
2591
贡献值
14
好评度
2594
访问TA的空间
加好友
用道具
论坛版主
加关注
发消息
只看该作者
4楼
发表于: 2009-03-06
“cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt-3.1/mkspecs/default -I.
-I. -I/2410s/qtopia/qt-2.3.10/include -o helloworld.o helloworld.cpp”
你的很乱阿,版本和写法不对应。
具体可参考这篇帖子:
http://www.qtkbase.com/read.php?tid=63&toread=1
共
条评分
欢迎访问我的博客,一起学习提高
http://blog.csdn.net/qter_wd007
回复
举报
发帖
回复
返回列表
http://www.qtcn.org/bbs
访问内容超出本站范围,不能确定是否安全
继续访问
取消访问
快速回复
限100 字节
您目前还是游客,请
登录
或
注册
进入高级模式
文字颜色
发 布
回复后跳转到最后一页
上一个
下一个
关闭
补充发布信息
验证码:
发 布
隐藏
快速跳转
站务及资讯
网站公告
新闻资讯
Qt官方发布
网站管理
Qt应用及资源
Qt 作品展
Qt代码秀
Qt应用版
Qt技术讨论区
Qt安装与发布
Qt中文处理
Qt基础编程
Qt QML开发
Qt嵌入式开发
Qt移动平台开发
其它技术开发讨论区
Qt图书专区
《C++ GUI Qt 4编程》(第2版)专栏
《Qt高级编程》专栏
《零基础学Qt4编程》专栏
《Qt设计模式》(第2版) 图书专栏
Python Qt GUI快速编程
Qt项目开发区
天池项目
Qt开放平台开发库
机械CAD
扇贝词典
非活跃项目区
社区中心
帖子回收站(Trash)
招聘、求职、供求、广告等
休闲娱乐
关闭
关闭
选中
1
篇
全选