/************************************************************************
* 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 二、基本操作流程:
. After Installing your host Ubuntu and then the SDK on your host machine: [How to install Ubuntu and your SDK]
在你电脑上安装Ubuntu及SDK。
. Create a new directory on your Ubuntu 10.04 host.
在Ubuntu中创建一个目录,叫:hello-world。
user@user-desktop:~$mkdir hello-world
. Change to that directory
进入刚刚创建的目录 。
user@user-desktop:~$cd hello-world
. 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
. 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();
}
. Execute the following commands: (If you already have a project file skip step )
执行以下命令:(如果你已经有一个工程项目文件,请跳过这一步)
[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. . This is what you have just created
这是刚刚你创建的文件,或者生成的文件。
[linux-devkit]:~/hello-world> ls
hello-world hello-world.cpp hello-world.o hello-world.pro Makefile
. copy the hello-world binary over to your file system and run hello-world on your target.
将hello-world二进制文件拷入你的文件系统,并在目标机器上运行。

Building QT projects from the command line的更多相关文章

  1. Building Xcode iOS projects and creating *.ipa file from the command line

    For our development process of iOS applications, we are using Jenkins set up on the Mac Mini Server, ...

  2. qt opencv编译错误 /usr/local/lib/libopencv_imgcodecs.so.3.1:-1: error: error adding symbols: DSO missing from command line

    转载自:http://tbfungeek.github.io/2016/03/05/Opencv-%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%87 ...

  3. How to build .apk file from command line(转)

    How to build .apk file from command line Created on Wednesday, 29 June 2011 14:32 If you don’t want ...

  4. How to deploy a Delphi OSX project from the command line

    Delphi has a well developed command line build process (via MSBuild) for Windows projects. After the ...

  5. ubuntu16.04安装virtualbox5.1失败 gcc:error:unrecognized command line option ‘-fstack-protector-strong’

    系统:ubuntu16.04.1 软件:Virtualbox-5.1 编译器:GCC 4.7.4 在如上环境下安装Vbx5.1提示我在终端执行/sbin/vboxconfig命令 照做 出现如下err ...

  6. cURL POST command line on WINDOWS RESTful service

    26down votefavorite 7 My problem: Running windows 7 and using the executable command line tool to cu ...

  7. 如何从Terminal Command Line编译并运行Scope

    Ubuntu SDK我们大部分的开发者是非常有效的.它甚至可以帮助我们进行在线调试.在这篇文章中,我们介绍了如何使用command line编译和执行我们scope. 1)创建一个主Scope 我们能 ...

  8. [笔记]The Linux command line

    Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...

  9. linux下安装QT5:error: unrecognized command line option ‘-fuse-ld=gold’

    安装qt时在执行./configure时报错:error: unrecognized command line option '-fuse-ld=gold' 这个错误是qt的一个bug. 在装有gol ...

随机推荐

  1. 阶段性放弃 wxPython 前的总结

    为了实现一个管理本地电子书的程序,搞了一段时间 GUI,使用 wxPython. 实在难以适应和习惯,也搞不出什么太好看的效果. 最不能忍受的是,多线程处理能力太弱.遂决定放弃 GUI. 放弃之前,整 ...

  2. Django1.6添加comments应用的简单过程

    今天尝试为自己开发的博客加上评论功能,查看Django的文档,发现1.6之后Django不再自带comments这个app了,下面是官方文档上的说明: Django’s comment framewo ...

  3. [msf]那些年儿跑过的字典

    SEC标签里都会说一些网络完全相关的,光说理论也不好,光将工具太肤浅,不做脚本小子,有一句话说的好,我们都知道最酷的是什么?酷的不是“h4ck3r”这两个字,而是技术. OK,-let's go!! ...

  4. 【转】C#路径/文件/目录/I/O常见操作汇总

    文件操作是程序中非常基础和重要的内容,而路径.文件.目录以及I/O都是在进行文件操作时的常见主题,这里想把这些常见的问题作个总结,对于每个问题,尽量提供一些解决方案,即使没有你想要的答案,也希望能提供 ...

  5. 记录类型中String的释放

    String能自动释放,在进行内存拷贝时需要进行手动释放.可以直接调用Finalize手工释放 如:TGraphicHideTab 记录中声明的Caption:string TGraphicHideT ...

  6. (转)《深入理解java虚拟机》学习笔记4——Java虚拟机垃圾收集器

    Java堆内存被划分为新生代和年老代两部分,新生代主要使用复制和标记-清除垃圾回收算法,年老代主要使用标记-整理垃圾回收算法,因此java虚拟中针对新生代和年老代分别提供了多种不同的垃圾收集器,JDK ...

  7. SQL Server 2008 的gis函数

    居然不知道sql有gis函数,孤陋寡闻了 https://msdn.microsoft.com/zh-cn/library/bb933904.aspx   STContains(geometry 数据 ...

  8. 【通信】Netty JBOSS提供的一个java开源框架

    Netty是由JBOSS提供的一个java开源框架.Netty提供异步的.事件驱动的网络应用程序框架和工具,用以快速开发高性能.高可靠性的网络服务器和客户端程序dsf. 也就是说,Netty 是一个基 ...

  9. Elasticsearch搜索类型(query type)详解

    关于我,邯郸人. 对这类话题感兴趣?欢迎发送邮件至donlianli@126.com 请支持原创http://www.cnblogs.com/donlianli/p/3857500.html    e ...

  10. java第四课:数组

    1.数组声明时,必须有中括号,但不指定数组的元素个数2.初始化时,必须指定元素个数3.数组元素内容仅能用于声明时初始化,不能用于赋值.如:char[] week; week={'1','2','3'} ...