您的位置:首页 > 编程语言 > Qt开发

Qt helloworld

2013-07-23 14:12 447 查看
MingZznet---------------------------------------------NOW--------------------------------------

1.新建helloworld文件夹

mkdir helloworld

2.在helloworld文件夹下建立helloworld.cpp文件

cd helloworld

touch helloworld.cpp

3.编辑helloworld.cpp

vi helloworld.cpp

输入以下内容:

#include <stdio.h>

int main()
{
printf("helloworld!\n");
return 0;
}
保存退出

4.生成项目文件helloworld.pro

qmake --project

5.生成Makefile文件

qmake

6.编译项目,生成helloworld文件

make

7.运行helloworld

./helloworld

8.结果输出:

helloworld!

----------------------------------------------------------THE END-----------------------MingZznet-------------------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: