<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Wed Jun 19, 2013 5:08 am by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Wed Jun 19, 2013 5:08 am</pubDate>
  <lastBuildDate>Wed Jun 19, 2013 5:08 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>RE: Using extra libraries with a QT based program</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=15789#15789</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5632'&gt;ChrisCook&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Jan 17, 2006 3:54 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I do something like this in a project Im working on currently (http://quarkplusplus.sf.net)&lt;br /&gt;
&lt;br /&gt;
In my qmake project file (*.pro) i have&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;INCLUDEPATH += . src /usr/include/python2.4&lt;br /&gt;
LIBS += -lpython2.4&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
this lets me do somthing like &lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;#include &amp;lt;Python.h&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
which includes the file Python.h from /usr/include/python2.4/&lt;br /&gt;
&lt;br /&gt;
the final executable file will be linked with the python2.4 library which it finds from the standard library path. if the library is somewhere else like in your home directory, use &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;LIBS += -L/home/joe/libs -lfred&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt; as in Nigel's example.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=15789#15789</comments>
                                        <author>ChrisCook</author>
                                        <pubDate>Tue Jan 17, 2006 3:54 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=15789#15789</guid>
                                      </item>
                                      <item>
                                        <title>RE: Using extra libraries with a QT based program</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13736#13736</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=162'&gt;Nigel&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Dec 07, 2005 4:37 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      You need to add them to the link statement in your makefile.&lt;br /&gt;
To link in a library called libfred.a that exists in directory /home/joe/libs (not part of $LD_LIBRARY_PATH) you would add the following two parameters to your link statement&lt;br /&gt;
-L /home/joe/libs -lfred&lt;br /&gt;
&lt;br /&gt;
(-L adds a directory to those that will be searched for libraries, -l links in a library. The &quot;lib&quot; prefix and &quot;.a&quot; (or &quot;.so&quot;) suffix is added by the compiler/linker.&lt;br /&gt;
&lt;br /&gt;
To call routines in the library you will have to include the appropriate header file in your C++ source.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13736#13736</comments>
                                        <author>Nigel</author>
                                        <pubDate>Wed Dec 07, 2005 4:37 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13736#13736</guid>
                                      </item>
                                      <item>
                                        <title>Using extra libraries with a QT based program</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=13733#13733</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2128'&gt;nerdmaster&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Dec 07, 2005 3:40 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I was wondering if anyone can advise me about using extra libraries with a qmake based program, since I'm quite new to these aspects of programming (with most of my experience over the past 2 years being based on Java)&lt;br /&gt;
&lt;br /&gt;
I'm writing a C++ based program for a computer vision project.  As a result, there are a number of external (static) libraries I need, these are for the image processing and display functions.  I am also planning on making the application graphical and have opted to use the QT toolkit, using qmake.&lt;br /&gt;
&lt;br /&gt;
I was wondering, how do I go about importing these libraries?  (bearing in mind that I don't have much experience with make)</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=13733#13733</comments>
                                        <author>nerdmaster</author>
                                        <pubDate>Wed Dec 07, 2005 3:40 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=13733#13733</guid>
                                      </item></channel></rss>