<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Connecting to a Library In Linux]]></title><description><![CDATA[<p dir="auto">Currently, I am using the Ubuntu version of Linux and trying to build a project that uses the ZMQ library. I would like to implement cppzmq/libzmq to do this. For reference, here is how I installed both libzmq and cpp zmq (did both in the home directory):</p>
<p dir="auto">Install libzmq</p>
<pre><code>git clone https://github.com/zeromq/libzmq.git
sudo apt-get update
sudo apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev
cd libzmq
./autogen.sh
./configure
make
make check
sudo make install
</code></pre>
<p dir="auto">Install cppzmq</p>
<pre><code>git clone https://github.com/zeromq/cppzmq.git
cd cppzmq
mkdir build
cd build
sudo snap install cmake
cmake ..
sudo make -j4 install
</code></pre>
<p dir="auto">For Qt, I used the online installer from Qt's download page (<a href="https://www.qt.io/download-open-source?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.qt.io/download-open-source?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce|6cb0de4f-9bb5-4778-ab02-bfb62735f3e5</a>).</p>
<p dir="auto">Also Noted: I have been able to successfully create Server/Client standalone ZMQ programs that work. Now, I just want to implement the client side in a qt app.</p>
<p dir="auto">Before I get started on this ZMQ project, <strong>I was wondering how I need to add the ZMQ library to ensure the program works; also, will using the #include zmq.hpp statement suffice, or will I need to write other statements in my program code?</strong> Thank you!</p>
]]></description><link>https://forum.qt.io/topic/131270/connecting-to-a-library-in-linux</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 05:04:25 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/131270.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Oct 2021 18:17:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 18:58:19 GMT]]></title><description><![CDATA[<p dir="auto">You can use that feature yes.</p>
]]></description><link>https://forum.qt.io/post/685819</link><guid isPermaLink="true">https://forum.qt.io/post/685819</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 19 Oct 2021 18:58:19 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Wed, 20 Oct 2021 06:27:54 GMT]]></title><description><![CDATA[<p dir="auto">@WesLow   If your program uses functions from libzmq. compiled. and linked cleanly then the linker options are OK (but possibly not perfect).   If you built and installed libzmq as you describe then the result is installed under  /usr/local/bin, lib etc.  The "-L" part of your LIBS variable is wrong but is possibly not required because /usr/local/lib will often be searched by default.</p>
<p dir="auto">If the black screen is from your running program then that is a different problem.</p>
]]></description><link>https://forum.qt.io/post/685854</link><guid isPermaLink="true">https://forum.qt.io/post/685854</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Wed, 20 Oct 2021 06:27:54 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 19:30:33 GMT]]></title><description><![CDATA[<p dir="auto">Not knowing anything of your code I would say you have gremlins in your screen :-)</p>
]]></description><link>https://forum.qt.io/post/685823</link><guid isPermaLink="true">https://forum.qt.io/post/685823</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 19 Oct 2021 19:30:33 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 19:23:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/dc56f0f8-f325-41f1-8329-6c2f9d8e7d98.png" alt="Screen Shot 2021-10-19 at 2.21.44 PM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So I went in and manually added the "LIBS" line instead of using the "Add Library Feature." Should this be enough? I didn't get any compilation errors but when I tried to run the program I built the entire window was just a black screen.</p>
]]></description><link>https://forum.qt.io/post/685822</link><guid isPermaLink="true">https://forum.qt.io/post/685822</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 19 Oct 2021 19:23:14 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 18:58:19 GMT]]></title><description><![CDATA[<p dir="auto">You can use that feature yes.</p>
]]></description><link>https://forum.qt.io/post/685819</link><guid isPermaLink="true">https://forum.qt.io/post/685819</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 19 Oct 2021 18:58:19 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 18:41:40 GMT]]></title><description><![CDATA[<p dir="auto">Using qmake; Would I use the "add library" option that shows when I right click the project name, or do I need to do linking manually in the .pro file?</p>
]]></description><link>https://forum.qt.io/post/685814</link><guid isPermaLink="true">https://forum.qt.io/post/685814</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 19 Oct 2021 18:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 18:39:49 GMT]]></title><description><![CDATA[<p dir="auto">Are you going to use qmake or cmake to handle your project ?</p>
<p dir="auto">In any case, the concept will be the same:</p>
<ul>
<li>set the path to the includes of the library</li>
<li>set the path to the folder where the library file can be found</li>
<li>link to the library</li>
</ul>
<p dir="auto">The first two are required if the files are in a non conventional location.</p>
<p dir="auto">CMake and qmake both have different ways to do it.</p>
]]></description><link>https://forum.qt.io/post/685813</link><guid isPermaLink="true">https://forum.qt.io/post/685813</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 19 Oct 2021 18:39:49 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 18:35:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Thank you for your quick response; Sorry if it seems like I'm having a tough time, but I don't have any experience with linking libraries (first time I've done this on a Qt project). Would I need to edit the project file, insert one of the files from the zmq library, or doing something entirely different? Once again, thank you for your help.</p>
]]></description><link>https://forum.qt.io/post/685811</link><guid isPermaLink="true">https://forum.qt.io/post/685811</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Tue, 19 Oct 2021 18:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to Connecting to a Library In Linux on Tue, 19 Oct 2021 18:26:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Qt is a C++ framework so using other libraries with it is the same as any other C++ project.</p>
<p dir="auto">That said, I remember there was some project to integrate ZMQ with Qt's event loop. You might want to check that.</p>
]]></description><link>https://forum.qt.io/post/685809</link><guid isPermaLink="true">https://forum.qt.io/post/685809</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 19 Oct 2021 18:26:11 GMT</pubDate></item></channel></rss>