<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- emb-install.qdoc --> <title>Qt 4.8: Installing Qt for Embedded Linux</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li>Installing Qt for Embedded Linux</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#step-1-installing-the-license-file-commercial-editions-only">Step 1: Installing the License File (commercial editions only)</a></li> <li class="level1"><a href="#step-2-unpacking-the-archive">Step 2: Unpacking the Archive</a></li> <li class="level1"><a href="#step-3-building-the-library">Step 3: Building the Library</a></li> <li class="level1"><a href="#step-4-adjusting-the-environment-variables">Step 4: Adjusting the Environment Variables</a></li> <li class="level1"><a href="#step-5-building-the-virtual-framebuffer">Step 5: Building the Virtual Framebuffer</a></li> </ul> </div> <h1 class="title">Installing Qt for Embedded Linux</h1> <span class="subtitle"></span> <!-- $$$qt-embedded-install.html-description --> <div class="descr"> <a name="details"></a> <p>This document describes how to install <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> in your development environment:</p> <p>Please see the <a href="qt-embedded-crosscompiling.html">cross compiling</a> and <a href="qt-embedded-deployment.html">deployment</a> documentation for details on how to install <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> on your target device.</p> <p>Note also that this installation procedure is written for Linux, and that it may need to be modified for other platforms.</p> <a name="step-1-installing-the-license-file-commercial-editions-only"></a> <h2>Step 1: Installing the License File (commercial editions only)</h2> <p>If you have the commercial edition of <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>, the first step is to install your license file as <tt>$HOME/.qt-license</tt>.</p> <p>For the open source version you do not need a license file.</p> <a name="step-2-unpacking-the-archive"></a> <h2>Step 2: Unpacking the Archive</h2> <p>First uncompress the archive in the preferred location, then unpack it:</p> <pre class="cpp"> cd <anywhere> gunzip qt-everywhere-opensource-src-4.8.5.tar.gz tar xf qt-everywhere-opensource-src-4.8.5.tar</pre> <p>This document assumes that the archive is unpacked in the following directory:</p> <pre class="cpp"> ~/qt-everywhere-opensource-src-4.8.5</pre> <a name="step-3-building-the-library"></a> <h2>Step 3: Building the Library</h2> <p>Before building the <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> library, run the <tt>./configure</tt> script to configure the library for your development architecture. You can list all of the configuration system's options by typing</p> <pre class="cpp"> ./configure -embedded -help</pre> <p>The <a href="configure-options.html">Configuration Options for Qt</a> page gives a brief overview of these.</p> <p>Note that by default, <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> is configured for installation in the <tt>/usr/local/Trolltech/QtEmbedded-4.8.5</tt> directory, but this can be changed by using the <tt>-prefix</tt> option. Alternatively, the <tt>-prefix-install</tt> option can be used to specify a "local" installation within the source directory.</p> <p>The configuration system is also designed to allow you to specify your platform architecture:</p> <pre class="cpp"> cd ~/qt-everywhere-opensource-src-4.8.5 ./configure -embedded [architecture]</pre> <p>In general, all Linux systems which have framebuffer support can use the <tt>generic</tt> architecture. Other typical architectures are <tt>x86</tt>, <tt>arm</tt> and <tt>mips</tt>.</p> <p><b>Note:</b> If you want to build Qt for Embedded Linux for use with a virtual framebuffer, pass the <tt>-qvfb</tt> option to the <tt>configure</tt> script.</p> <p>To create the library and compile all the demos, examples, tools, and tutorials, type:</p> <pre class="cpp"> make</pre> <p>On some systems the <tt>make</tt> utility is named differently, e.g. <tt>gmake</tt>. The <tt>configure</tt> script tells you which <tt>make</tt> utility to use.</p> <p>If you did not configure <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> using the <tt>-prefix-install</tt> option, you need to install the library, demos, examples, tools, and tutorials in the appropriate place. To do this, type:</p> <pre class="cpp"> su -c "make install"</pre> <p>and enter the root password.</p> <p><b>Note:</b> You can use the <tt>INSTALL_ROOT</tt> environment variable to specify the location of the installed files when invoking <tt>make install</tt>.</p> <a name="step-4-adjusting-the-environment-variables"></a> <h2>Step 4: Adjusting the Environment Variables</h2> <p>In order to use <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>, the <tt>PATH</tt> variable must be extended to locate <tt>qmake</tt>, <tt>moc</tt> and other <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> tools, and the <tt>LD_LIBRARY_PATH</tt> must be extended for compilers that do not support <tt>rpath</tt>.</p> <p>To set the <tt>PATH</tt> variable, add the following lines to your <tt>.profile</tt> file if your shell is bash, ksh, zsh or sh:</p> <pre class="cpp"> PATH=/usr/local/Trolltech/QtEmbedded-4.8.5/bin:$PATH export PATH</pre> <p>In case your shell is csh or tcsh, add the following line to the <tt>.login</tt> file instead:</p> <pre class="cpp"> setenv PATH /usr/local/Trolltech/QtEmbedded-4.8.5/bin:$PATH</pre> <p>If you use a different shell, please modify your environment variables accordingly.</p> <p>For compilers that do not support <tt>rpath</tt> you must also extend the <tt>LD_LIBRARY_PATH</tt> environment variable to include <tt>/usr/local/Trolltech/QtEmbedded-4.8.5/lib</tt>. Note that on Linux with GCC, this step is not needed.</p> <a name="step-5-building-the-virtual-framebuffer"></a> <h2>Step 5: Building the Virtual Framebuffer</h2> <p>For development and debugging, <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> provides a virtual framebuffer as well as the option of running <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> as a VNC server. For a description of how to install the virtual framebuffer and how to use the VNC protocol, please consult the documentation at:</p> <ul> <li><a href="qvfb.html">The Virtual Framebuffer</a></li> <li><a href="qt-embedded-vnc.html">The VNC Protocol and Qt for Embedded Linux</a></li> </ul> <p>Note that the virtual framebuffer requires a Qt for X11 installation. See <a href="install-x11.html">Installing Qt for X11 Platforms</a> for details.</p> <p>The Linux framebuffer, on the other hand, is enabled by default on all modern Linux distributions. For information on older versions, see <a href="http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html">http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html</a>. To test that the Linux framebuffer is set up correctly, use the program provided by the <a href="qt-embedded-testingframebuffer.html">Testing the Linux Framebuffer</a> document.</p> <p>That's all. <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> is now installed.</p> <table class="generic" width="100%"> <tr valign="top" class="odd"><td ><b>Customizing the Qt for Embedded Linux Library</b><p>When building embedded applications on low-powered devices, reducing the memory and CPU requirements is important.</p> <p>A number of options tuning the library's performance are available. But the most direct way of saving resources is to fine-tune the set of Qt features that is compiled. It is also possible to make use of accelerated graphics hardware.</p> <ul> <li><a href="fine-tuning-features.html">Fine-Tuning Features in Qt</a></li> <li><a href="qt-performance.html">Qt Performance Tuning</a></li> <li><a href="qt-embedded-accel.html">Adding an Accelerated Graphics Driver to Qt for Embedded Linux</a></li> </ul> </td></tr> </table> </div> <!-- @@@qt-embedded-install.html --> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>