Book Image

Application Development with Qt Creator - Second Edition

Book Image

Application Development with Qt Creator - Second Edition

Overview of this book

Table of Contents (20 chapters)
Application Development with Qt Creator Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building projects from the command line


Sometimes, you need to build a project from the command line. Maybe you're working on Linux and you're just more comfortable there, or you've got a remote session running on your desktop while you're in a meeting. Or, maybe you want to automate builds on a build server and need to know how Qt performs its compilation magic for your builds.

The trick lies in qmake: Qt's meta-make system that manages the generation of make files for the compiler toolchain you already have installed. The qmake command takes the .pro files, which you first saw in Chapter 2, Building Applications with Qt Creator, and generates the make or nmake file necessary for your tool chain to build your application.

First, ensure that you have your compiler and set utility in your system path; how you do this varies from one development environment to another. Next, be sure to have commands for Qt's build system in your path—a default if you've installed Qt on Linux using the package...