123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.20"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>Qwt User's Guide: Installing Qwt</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">Qwt User's Guide
-  <span id="projectnumber">6.1.6</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.20 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(function(){initNavTree('qwtinstall.html',''); initResizable(); });
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div class="PageDoc"><div class="header">
- <div class="headertitle">
- <div class="title">Installing Qwt </div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="toc"><h3>Table of Contents</h3>
- <ul><li class="level1"><a href="#DOWNLOAD">Download</a></li>
- <li class="level1"><a href="#INSTALL">Installing Qwt</a><ul><li class="level2"><a href="#CONFIGSUBSECTION">Configuration</a></li>
- <li class="level2"><a href="#BUILDSUBSECTION">Build and installation</a><ul><li class="level3"><a href="#qwtinstall-unix">Unix-like systems</a></li>
- <li class="level3"><a href="#qwtinstall-windows">Windows</a><ul><li class="level4"><a href="#qwtinstall-windows-mingw">MinGW</a></li>
- <li class="level4"><a href="#qwtinstall-windows-msvc">MSVC</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- <li class="level1"><a href="#INTEGRATION">Qwt and the Qt tool chain</a><ul><li class="level2"><a href="#USEPLUGIN">Designer plugin</a></li>
- <li class="level2"><a href="#USEHELP">Online Help</a></li>
- </ul>
- </li>
- <li class="level1"><a href="#COMPILEANDLINKAPP">Building a Qwt application</a></li>
- <li class="level1"><a href="#RUNAPP">Running a Qwt application</a><ul><li class="level2"><a href="#RUNWINDOWS">Windows</a></li>
- <li class="level2"><a href="#RUNLINUX">GNU/Linux</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="textblock"><h1><a class="anchor" id="DOWNLOAD"></a>
- Download</h1>
- <p>Stable Qwt releases are available from the Qwt <a href="https://sourceforge.net/projects/qwt/files/qwt">project page</a>.</p>
- <p>Qwt-6.1.6 consists of 4 files:</p>
- <ul>
- <li>qwt-6.1.6.zip<br />
- Zip file with the Qwt sources and the html documentation for Windows</li>
- <li>qwt-6.1.6.tar.bz2<br />
- Compressed tar file with the Qwt sources and the html documentation for UNIX systems ( Linux, Mac, ... )</li>
- <li>qwt-6.1.6.pdf<br />
- Qwt documentation as PDF document.</li>
- <li>qwt-6.1.6.qch<br />
- Qwt documentation as Qt Compressed Help document, that can be loaded into the Qt Assistant or Creator. In the Qt Creator context sensitive help will be available like for Qt classes.</li>
- </ul>
- <p>Precompiled Qwt Designer plugins, that are compatible with some binary packages of the Qt Creator:</p>
- <ul>
- <li>qwtdesigner-6.1.6-*.zip</li>
- </ul>
- <h1><a class="anchor" id="INSTALL"></a>
- Installing Qwt</h1>
- <p>Beside headers, libraries and the html version of the class documentation a proper Qwt installation contains a Designer plugin and a Qwt features file for building applications using Qwt.</p>
- <p>All files will be copied to an installation directory, that is configurable by editing qwtconfig.pri. Its default settings is:</p>
- <ul>
- <li>Windows<br />
- C:\Qwt-6.1.6</li>
- <li>Unix like systems<br />
- /usr/local/qwt-6.1.6</li>
- </ul>
- <p>For the rest of the document this install path will be written as <em>${QWT_ROOT}</em> and needs to be replaced by the real path in all commands below.</p>
- <p>It is not unlikely, to have more than one installation of Qwt on the same system. F.e for using the Qwt Designer plugin in the Qt Creator a version of Qwt is necessary with the same Qt and compiler combination, that had been used for building the Qt Creator ( see "Help->About Qt Creator ..." ).</p>
- <p>Installing Qwt is done in 3 steps, that are quite common on UNIX systems.</p>
- <ol type="1">
- <li>Configuration<br />
- In the configuration step all parameters are set to control how to build and install Qwt</li>
- <li>Build<br />
- In the build step binaries are built from the source files.</li>
- <li>Installation<br />
- The installation copies and rearranges all files that are necessary to build Qwt applications to a target directory.</li>
- </ol>
- <p>The installation doesn't modify the system beside copying files to a directory in a proper way. After removing build and installation directories the system is in the same state as it was before.</p>
- <h2><a class="anchor" id="CONFIGSUBSECTION"></a>
- Configuration</h2>
- <p>Configuring Qwt has to be done by editing the Project files used for building:</p>
- <ul>
- <li>qwtbuild.pri<br />
- qwtbuild.pri contains settings for how to build Qwt. All settings of this file are only for building Qwt itself and doesn't have an impact on how an application using Qwt is built. Usually its default settings doesn't need to be modified.</li>
- <li>qwtconfig.pri<br />
- qwtconfig.pri defines what modules of Qwt will be built and where to install them. qwtconfig.pri gets installed together with the Qwt features file qwt.prf and all its settings are known to project files for building Qwt applications.</li>
- </ul>
- <p>In qwtconfig.pri the meaning of each option is explained in detail - it's worth reading it before running into problems later.</p>
- <h2><a class="anchor" id="BUILDSUBSECTION"></a>
- Build and installation</h2>
- <p>The Qt Creator is a graphical frontend for calling qmake/make and - technically - it could be used for building and installing Qwt. But as this way requires a lot more understanding of details the following step by step instructions are for the easier way using the command line.</p>
- <h3><a class="anchor" id="qwtinstall-unix"></a>
- Unix-like systems</h3>
- <p>The first step before creating the Makefile is to check that the correct version of qmake is used. F.e. on older Linux distribution you often find a Qt3 qmake and in the path.</p>
- <p>The default setting of qmake is to generate a makefile that builds Qwt for the same environment where the version of qmake has been built for. So creating a makefile usually means something like:</p>
- <div class="fragment"><div class="line">cd qwt-6.1.6</div>
- <div class="line">/usr/local/Qt-5.0.1/bin/qmake qwt.pro</div>
- </div><!-- fragment --><p>The generated Makefile includes all paths related to the chosen Qt version and the next step is:</p>
- <div class="fragment"><div class="line">make</div>
- </div><!-- fragment --><p> ( On multicore systems you can speed up building the Qwt libraries with running several jobs simultaneously: f.e. "make -j4" on a dual core. )</p>
- <p>Finally you have to install everything below the directories you have specified in qwtconfig.pri. Usually this is one of the system directories ( /usr/local, /opt, ... ) where you don't have write permission and then the installation needs to be done as root:</p>
- <div class="fragment"><div class="line">sudo make install</div>
- </div><!-- fragment --><p> ( On systems where sudo is not supported you can do the same with: su -c "make install" )</p>
- <h3><a class="anchor" id="qwtinstall-windows"></a>
- Windows</h3>
- <p>Qt packages offer a command line interface, that can be found in the Qt application menu: f.e "All Programs -> Qt -> Command Prompt". It is not mandatory to use it, but probably the easiest way as it offers an environment, where everything is initialized for a version of Qt ( f.e qmake is in the PATH ).</p>
- <p>Creating a makefile usually means something like:</p>
- <div class="fragment"><div class="line">cd qwt-6.1.6</div>
- <div class="line">qmake qwt.pro</div>
- </div><!-- fragment --><p>The generated makefile includes all paths related to the chosen Qt version.</p>
- <h4><a class="anchor" id="qwtinstall-windows-mingw"></a>
- MinGW</h4>
- <p>For MinGW builds the name of the make tool is "mingw32-make"</p>
- <div class="fragment"><div class="line">mingw32-make</div>
- </div><!-- fragment --><p> ( On multicore systems you can speed up building the Qwt libraries with running several jobs simultaneously: "mingw32-make -j" )</p>
- <p>Finally you have to install everything below the directories you have specified in qwtconfig.pri.</p>
- <div class="fragment"><div class="line">mingw32-make install</div>
- </div><!-- fragment --><h4><a class="anchor" id="qwtinstall-windows-msvc"></a>
- MSVC</h4>
- <p>For MSVC builds the name of the make tool is "nmake". Alternatively it is possible to use "jom" ( <a href="https://wiki.qt.io/Jom">https://wiki.qt.io/Jom</a> ), that is usually included in a Qt Creator package.</p>
- <div class="fragment"><div class="line">nmake</div>
- </div><!-- fragment --><p>Finally you have to install everything below the directories you have specified in qwtconfig.pri.</p>
- <div class="fragment"><div class="line">nmake install</div>
- </div><!-- fragment --><h1><a class="anchor" id="INTEGRATION"></a>
- Qwt and the Qt tool chain</h1>
- <h2><a class="anchor" id="USEPLUGIN"></a>
- Designer plugin</h2>
- <p>The Designer plugin and the corresponding Qwt library ( if the plugin has not been built self containing ) have to be compatible with Qt version of the application loading it ( usually the Qt Creator ) - what is often a different version of the Qt libraries you want to build your application with. F.e on Windows the Qt Creator is usually built with a MSVC compiler - even if included in a MinGW package !</p>
- <p>To help Qt Designer/Creator with locating the Qwt Designer plugin you have to set the environment variable QT_PLUGIN_PATH, modify qt.conf - or install the plugin to one of the application default paths.</p>
- <p>The Qt documentation explains all options in detail:</p>
- <ul>
- <li><a href="https://doc.qt.io/qt-5/deployment-plugins.html">https://doc.qt.io/qt-5/deployment-plugins.html</a></li>
- <li><a href="https://doc.qt.io/qtcreator/adding-plugins.html">https://doc.qt.io/qtcreator/adding-plugins.html</a></li>
- </ul>
- <p>F.e. on a Linux system you could add the following lines to .bashrc:</p>
- <div class="fragment"><div class="line">QT_PLUGIN_PATH=<span class="stringliteral">"${QWT_ROOT}/plugins:$QT_PLUGIN_PATH"</span></div>
- <div class="line">export QT_PLUGIN_PATH</div>
- </div><!-- fragment --><p>When the plugin has not been built including the Qwt library ( see QwtDesignerSelfContained in qwtconfig.pri ) the Qt Designer/Creator also needs to locate the Qwt libraries. On Unix systems the path to the installed library is compiled into the plugin ( see rpath, ldd ), but on Windows the Qt Creator needs to be configured ( ( <a class="el" href="qwtinstall.html#RUNAPP">Running a Qwt application</a> ) in the same way as for any application using Qwt.</p>
- <p>In case of problems the diagnostics of Qt Creator and Designer are very limited ( usually none ), but setting the environment variable QT_DEBUG_PLUGINS might help. In the Qt Creator it is possible to check which plugins were loaded successfully and for certain problems it also lists those that were recognized but failed ( <em>Tools > Form Editor > About Qt Designer Plugins</em> ).</p>
- <h2><a class="anchor" id="USEHELP"></a>
- Online Help</h2>
- <p>The Qwt class documentation can be loaded into the Qt Creator:</p>
- <ul>
- <li>open the settings dialog from the <em>Tools->Options</em> menu</li>
- <li>raise the tab "Help->Documentation".</li>
- <li>press the <em>Add</em> button and select qwt-6.1.6.qch.</li>
- </ul>
- <p>Now the context sensitive help ( <em>F1</em> ) works for Qwt classes.</p>
- <p>For browsing the documentation in the Qt Assistant:</p>
- <ul>
- <li>open the settings dialog from the <em>Edit->Preferences</em> menu</li>
- <li>raise the tab <em>Documentation</em>.</li>
- <li>press the <em>Add</em> button and select qwt-6.1.6.qch.</li>
- </ul>
- <h1><a class="anchor" id="COMPILEANDLINKAPP"></a>
- Building a Qwt application</h1>
- <p>All flags and settings that are necessary to compile and link an application using Qwt can be found in the file ${QWT_ROOT}/features/qwt.prf.</p>
- <p>When using qmake it can included from the application project file in 2 different ways:</p>
- <ul>
- <li><p class="startli">Adding Qwt as qmake feature<br />
- <br />
- When using the qmake feature mechanism you can bind a special version of qmake to a special installation of Qwt without having to add this dependency to the application project. How to add Qwt as feature is documented in the <a href="http://doc.qt.io/qt-5/qmake-advanced-usage.html#adding-new-configuration-features">qmake docs</a>.</p>
- <p class="startli">After adding Qwt as a feature f.e on Linux as a persistent property .... </p><div class="fragment"><div class="line">qmake -set QMAKEFEATURES ${QWT_ROOT}/features</div>
- </div><!-- fragment --><p> .. the following line can be added to the application project file: </p><div class="fragment"><div class="line">CONFIG += qwt</div>
- </div><!-- fragment --></li>
- <li>Including qwt.prf in the application project file<br />
- <br />
- Instead of using qwt.prf as qmake feature it can be included from the application project file:<br />
- <br />
- <div class="fragment"><div class="line">include ( ${QWT_ROOT}/features/qwt.prf )</div>
- </div><!-- fragment --> <br />
- The advantage of using a direct include is, that all settings of qwt.prf are known to the application project file ( qmake features are included after the application project file has been parsed ) and it can be implemented depending on - f.e. settings made in qwtconfig.pri.</li>
- </ul>
- <p>On Unix platforms it is possible to link a runtime path into the executable, so that the location of the Qwt libraries can be found without having to configure a runtime environment:</p><ul>
- <li><a href="/https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-lflags-rpath">QMAKE_LFLAGS_RPATH</a></li>
- <li><a href="/https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-rpath">QMAKE_RPATH</a></li>
- <li><a href="/https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-rpathdir">QMAKE_RPATHDIR</a></li>
- </ul>
- <h1><a class="anchor" id="RUNAPP"></a>
- Running a Qwt application</h1>
- <p>When using Qwt as shared library ( DLL ) the <a href="http://en.wikipedia.org/wiki/Dynamic_linker">dynamic linker</a> has to find it according to the rules of the operating system.</p>
- <h2><a class="anchor" id="RUNWINDOWS"></a>
- Windows</h2>
- <p>The only reasonable way to configure the runtime environment - without having to copy the Qwt libraries around - is to modify the PATH variable. F.e. this could be done by adding the following line to some batch file:</p>
- <div class="fragment"><div class="line">set PATH=%PATH%;${QWT_ROOT}\lib</div>
- </div><!-- fragment --><h2><a class="anchor" id="RUNLINUX"></a>
- GNU/Linux</h2>
- <p>Read the documentation about:</p>
- <ul>
- <li><em>ldconfig</em></li>
- <li><em>/etc/ld.so.conf</em></li>
- <li><em>LD_LIBRARY_PATH</em></li>
- </ul>
- <p>Using the <em>ldd</em> command a configuration can be tested. </p>
- </div></div><!-- contents -->
- </div><!-- PageDoc -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
- </ul>
- </div>
- </body>
- </html>
|