<?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[Can I create a so file for CMAKE Project, using QT?]]></title><description><![CDATA[<p dir="auto">using QT 5.6.3 version</p>
<p dir="auto">NewProject -&gt; C++Library -&gt; Shared Library</p>
<p dir="auto">made a project for so file and added a simple working function.</p>
<p dir="auto">I think i followed the basic form of shared library project.</p>
<p dir="auto">and built it, bring it to my CMAKE Project, added like below</p>
<p dir="auto">INCLUDE_DIRECTORIES(/usr/local/include/opencv4 ./includes)</p>
<p dir="auto">find_library(<br />
libmy<br />
NAMES libmy_hello.so<br />
HINTS ./lib<br />
REQUIRED<br />
)<br />
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS1} ${OpenCV_LIBS2} ${OpenCV_LIBS3} ${OpenCV_LIBS4} ${libmy})</p>
<p dir="auto">undefined reference to 'simple function' error occured.</p>
<p dir="auto">I do not reckon where i did wrong...</p>
<p dir="auto">any answer would be appriciated</p>
]]></description><link>https://forum.qt.io/topic/143487/can-i-create-a-so-file-for-cmake-project-using-qt</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 13:57:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/143487.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Mar 2023 07:30:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Wed, 08 Mar 2023 07:50:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/manykim">@<bdi>manykim</bdi></a> said in <a href="/post/750342">Can I create a so file for CMAKE Project, using QT?</a>:</p>
<blockquote>
<p dir="auto">undefined reference to 'simple function' error occured.</p>
</blockquote>
<p dir="auto">Either you're not linking properly (lib not found or is not compatible), or you did not export simple_function in your lib.</p>
]]></description><link>https://forum.qt.io/post/750343</link><guid isPermaLink="true">https://forum.qt.io/post/750343</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 08 Mar 2023 07:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Thu, 09 Mar 2023 03:13:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/manykim">@<bdi>manykim</bdi></a> said in <a href="/post/750342">Can I create a so file for CMAKE Project, using QT?</a>:</p>
<blockquote>
<p dir="auto">I do not reckon where i did wrong...</p>
</blockquote>
<p dir="auto">Did the linker even find your my_hello library?</p>
<p dir="auto">Post the link related commands and output executed by the Makefile that CMake generated for you.</p>
<pre><code>make VERBOSE=1
</code></pre>
]]></description><link>https://forum.qt.io/post/750477</link><guid isPermaLink="true">https://forum.qt.io/post/750477</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Thu, 09 Mar 2023 03:13:27 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Thu, 09 Mar 2023 00:00:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joecfd">@<bdi>JoeCFD</bdi></a> Linux, Ubuntu !! sir</p>
]]></description><link>https://forum.qt.io/post/750469</link><guid isPermaLink="true">https://forum.qt.io/post/750469</guid><dc:creator><![CDATA[manykim]]></dc:creator><pubDate>Thu, 09 Mar 2023 00:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Wed, 08 Mar 2023 16:03:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/manykim">@<bdi>manykim</bdi></a> is this on Linux or Windows?</p>
]]></description><link>https://forum.qt.io/post/750419</link><guid isPermaLink="true">https://forum.qt.io/post/750419</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Wed, 08 Mar 2023 16:03:54 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Wed, 08 Mar 2023 08:37:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/manykim">@<bdi>manykim</bdi></a> said in <a href="/post/750344">Can I create a so file for CMAKE Project, using QT?</a>:</p>
<blockquote>
<p dir="auto">link was done correctly</p>
</blockquote>
<p dir="auto">How can it be correct if you get "undefined reference" linker error?!</p>
<p dir="auto">Regarding exporting symbols in libraries: please read <a href="https://doc.qt.io/qt-6/sharedlibrary.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/sharedlibrary.html</a></p>
]]></description><link>https://forum.qt.io/post/750350</link><guid isPermaLink="true">https://forum.qt.io/post/750350</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 08 Mar 2023 08:37:16 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Wed, 08 Mar 2023 08:17:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> I checked that in my qt Project the library works fine so I think export is ok... what would be my problem sir?</p>
]]></description><link>https://forum.qt.io/post/750347</link><guid isPermaLink="true">https://forum.qt.io/post/750347</guid><dc:creator><![CDATA[manykim]]></dc:creator><pubDate>Wed, 08 Mar 2023 08:17:07 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Wed, 08 Mar 2023 08:01:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> sir please tell me more, I think, because i cannot find any special error in CMAKE project,  link was done correctly... then how can I export my function? i put the macro for "Q_DECL_EXPORT" before function name in header file. was it enough? sorry for my bad language</p>
]]></description><link>https://forum.qt.io/post/750344</link><guid isPermaLink="true">https://forum.qt.io/post/750344</guid><dc:creator><![CDATA[manykim]]></dc:creator><pubDate>Wed, 08 Mar 2023 08:01:24 GMT</pubDate></item><item><title><![CDATA[Reply to Can I create a so file for CMAKE Project, using QT? on Wed, 08 Mar 2023 07:50:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/manykim">@<bdi>manykim</bdi></a> said in <a href="/post/750342">Can I create a so file for CMAKE Project, using QT?</a>:</p>
<blockquote>
<p dir="auto">undefined reference to 'simple function' error occured.</p>
</blockquote>
<p dir="auto">Either you're not linking properly (lib not found or is not compatible), or you did not export simple_function in your lib.</p>
]]></description><link>https://forum.qt.io/post/750343</link><guid isPermaLink="true">https://forum.qt.io/post/750343</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 08 Mar 2023 07:50:19 GMT</pubDate></item></channel></rss>