当前位置: 首页 > news >正文

Building QT projects from the command line

/************************************************************************
 *            Building QT projects from the command line
 * 说明:
 *     很多时候都是通过Qtcreator进行项目的创建以及编译,但是有时候可能
 * 会遇到一些编译小问题,这时候命令行创建工程、编译工程可以作为测试、验证
 * 的一种手段。
 *
 *                                     2016-3-2 深圳 南山平山村 曾剑锋
 ***********************************************************************/

一、参考文档:
    Building QT projects from the command line
        http://processors.wiki.ti.com/index.php/Building_QT_Projects

二、基本操作流程:
    1. After Installing your host Ubuntu and then the SDK on your host machine: [How to install Ubuntu and your SDK]
        在你电脑上安装Ubuntu及SDK。
    2. Create a new directory on your Ubuntu 10.04 host.
        在Ubuntu中创建一个目录,叫:hello-world。
        user@user-desktop:~$mkdir hello-world
    3. Change to that directory
        进入刚刚创建的目录 。
        user@user-desktop:~$cd hello-world
    4. Source the environment setup to get access to qmake and the gcc compiler
        导入环境变量,这样你才能够使用qmake和gcc编译器。
        user@user-desktop:~/hello-world$ source /home/user/ti-sdk-am335x-evm-05.03.00.00/linux-devkit/environment-setup
    5. Create a new file: hello-world.cpp and copy in the following source code to hello-world.cpp
        创建hello-world.cpp文件,并将以下源代码拷入文件中。
        #include <QApplication>
        #include <QLabel>
    
        int main(int argc, char **argv)
        {
            QApplication app(argc, argv);
            
            QLabel label("Hello World!");
            label.show();
            
            return app.exec();
        }
    6. Execute the following commands: (If you already have a project file skip step 1)
        执行以下命令:(如果你已经有一个工程项目文件,请跳过这一步)
        [linux-devkit]:~/hello-world> qmake -project // The first command creates a project file: hello-world.pro.
        [linux-devkit]:~/hello-world> qmake // The second generates a makefile based on the project file.
        [linux-devkit]:~/hello-world> make // The third compiles and builds the project.
    
    7. This is what you have just created
        这是刚刚你创建的文件,或者生成的文件。
        [linux-devkit]:~/hello-world> ls
        hello-world  hello-world.cpp  hello-world.o  hello-world.pro  Makefile
    8. copy the hello-world binary over to your file system and run hello-world on your target.
        将hello-world二进制文件拷入你的文件系统,并在目标机器上运行。

 

转载于:https://www.cnblogs.com/zengjfgit/p/5234075.html

相关文章:

  • http 状态码(转载)
  • 集成Diagram Viewer跟踪流程
  • PHP 7.0.4 Windows升级
  • 发现一个nginx LUA开发Web App的框架
  • golang笔记——string
  • 【转】Android Support v4、v7、v13的区别和应用场景
  • 【HDOJ】4326 Game
  • js 定义类对象
  • Android 解决onInterceptTouchEvent只能拦截到Down事件
  • 本地使用SVN编辑发布远程SAE工程
  • Oracle_spatial的空间操作符介绍
  • 用JavaScript代码实现Excel表格的办法
  • 今天开始学习python
  • Robotium入门
  • permutation II (boss出来了)
  • 9月CHINA-PUB-OPENDAY技术沙龙——IPHONE
  • canvas 高仿 Apple Watch 表盘
  • Docker下部署自己的LNMP工作环境
  • ES6之路之模块详解
  • github指令
  • HTTP请求重发
  • iOS 系统授权开发
  • JS数组方法汇总
  • leetcode-27. Remove Element
  • Linux中的硬链接与软链接
  • Transformer-XL: Unleashing the Potential of Attention Models
  • TypeScript实现数据结构(一)栈,队列,链表
  • v-if和v-for连用出现的问题
  • 汉诺塔算法
  • 前嗅ForeSpider采集配置界面介绍
  • 区块链分支循环
  • 世界上最简单的无等待算法(getAndIncrement)
  • 适配mpvue平台的的微信小程序日历组件mpvue-calendar
  • 学习HTTP相关知识笔记
  • 自制字幕遮挡器
  • ​第20课 在Android Native开发中加入新的C++类
  • ​决定德拉瓦州地区版图的关键历史事件
  • ​软考-高级-系统架构设计师教程(清华第2版)【第15章 面向服务架构设计理论与实践(P527~554)-思维导图】​
  • #QT(串口助手-界面)
  • #设计模式#4.6 Flyweight(享元) 对象结构型模式
  • (1) caustics\
  • (NO.00004)iOS实现打砖块游戏(九):游戏中小球与反弹棒的碰撞
  • (安卓)跳转应用市场APP详情页的方式
  • (待修改)PyG安装步骤
  • (力扣)循环队列的实现与详解(C语言)
  • (免费分享)基于springboot,vue疗养中心管理系统
  • (原)Matlab的svmtrain和svmclassify
  • (转载)PyTorch代码规范最佳实践和样式指南
  • (轉貼) 蒼井そら挑戰筋肉擂台 (Misc)
  • (总结)Linux下的暴力密码在线破解工具Hydra详解
  • .MyFile@waifu.club.wis.mkp勒索病毒数据怎么处理|数据解密恢复
  • .NET Core 实现 Redis 批量查询指定格式的Key
  • .net core 源码_ASP.NET Core之Identity源码学习
  • .NET Micro Framework 4.2 beta 源码探析
  • .NET Standard 支持的 .NET Framework 和 .NET Core