七度黑光--当感到一切都毫无头绪的时候,最好静下心来从基础开始.
qt学习最简单的例子
2008-04-08 13:14:24 / 个人分类:linux学习笔记
相关阅读:
- LINUX中断学习笔记2--中断号的查看 (helight, 2008-3-08)
- LINUX中断学习笔记3--中断服务程序的编写 (helight, 2008-3-08)
- 2.6.24的内核编译 (helight, 2008-3-12)
- vmlinuz,Initrd和system.map简介: (helight, 2008-3-12)
- 在刚刚编译出来的内核上编译的内核模块 (helight, 2008-3-12)
- Ubuntu下2.6.24的内核编译 (helight, 2008-3-19)
- 2.6.24的内核编译--initrd-2.6.24.img的分析 (helight, 2008-3-19)
- gtk2.0编成实践--最简单的例子 (helight, 2008-3-23)
- Printk的loglevel和日志记录分析 (helight, 2008-4-01)
- Linux select学习笔记 (helight, 2008-4-02)
论坛模式 推荐 收藏 等级(1) 编辑 管理 查看(1555) 评论(4)
TAG: linux学习笔记
-
ranfow
发布于2008-04-09 23:54:21
-
我的是qt-3.3.8b-2.fc8
我查过了
QApplication =>qapplication
QPushButton => qpushbutton
QWidget => qwidget
QLabel =>
没有QVBoxLayout
-
helight
发布于2008-04-09 12:54:27
-
你的qt没有安装么?忘了说了,这是qt4.3.2的.
-
ranfow
发布于2008-04-09 12:45:44
-
[ranfow@localhost qt]$ 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 -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o hello.o hello.cpp
hello.cpp:1:24: error: QApplication: No such file or directory
hello.cpp:2:23: error: QPushButton: No such file or directory
hello.cpp:3:19: error: QWidget: No such file or directory
hello.cpp:4:23: error: QVBoxLayout: No such file or directory
hello.cpp:5:18: error: QLabel: No such file or directory
hello.cpp: In function ‘int main(int, char**)’:
hello.cpp:9: error: ‘QApplication’ was not declared in this scope
hello.cpp:9: error: expected `;' before ‘app’
hello.cpp:10: error: ‘QPushButton’ was not declared in this scope
hello.cpp:10: error: ‘hello’ was not declared in this scope
hello.cpp:10: error: expected type-specifier before ‘QPushButton’
hello.cpp:10: error: expected `;' before ‘QPushButton’
hello.cpp:12: error: ‘QWidget’ was not declared in this scope
hello.cpp:12: error: ‘pWidget’ was not declared in this scope
hello.cpp:12: error: expected type-specifier before ‘QWidget’
hello.cpp:12: error: expected `;' before ‘QWidget’
hello.cpp:14: error: ‘QLabel’ was not declared in this scope
hello.cpp:14: error: expected `;' before ‘label’
hello.cpp:15: error: ‘btn’ was not declared in this scope
hello.cpp:15: error: expected type-specifier before ‘QPushButton’
hello.cpp:15: error: expected `;' before ‘QPushButton’
hello.cpp:16: error: ‘QVBoxLayout’ was not declared in this scope
hello.cpp:16: error: ‘layout’ was not declared in this scope
hello.cpp:16: error: expected type-specifier before ‘QVBoxLayout’
hello.cpp:16: error: expected `;' before ‘QVBoxLayout’
hello.cpp:18: error: ‘label’ was not declared in this scope
hello.cpp:22: error: expected primary-expression before ‘>’ token
hello.cpp:22: error: ‘setLayout’ was not declared in this scope
hello.cpp:24: error: ‘QObject’ has not been declared
hello.cpp:24: error: ‘clicked’ was not declared in this scope
hello.cpp:24: error: ‘SIGNAL’ was not declared in this scope
hello.cpp:24: error: ‘close’ was not declared in this scope
hello.cpp:24: error: ‘SLOT’ was not declared in this scope
hello.cpp:27: error: ‘app’ was not declared in this scope
hello.cpp: At global scope:
hello.cpp:7: warning: unused parameter ‘argc’
hello.cpp:7: warning: unused parameter ‘argv’
make: *** [hello.o] Error 1
-
someone
发布于2008-04-08 19:26:57
-
这不简单啊,隐含了好多头文件,lib库,linux下编程实际上很大一个弊病,相对于windows来说
就是缺乏SDK,虽然有qtdesigner ,不过编译环境还是要自己设
这里如果是新手,谁会自己去搭建
qt的编译环境?
那可需要很长时间啊
