<?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[qt_add_qml_module not working for windows, when linked into an app]]></title><description><![CDATA[<p dir="auto">Hey, I am running into a problem with</p>
<pre><code>qt_add_qml_module
</code></pre>
<p dir="auto">on windows, the same code runs all fine on linx tho.</p>
<p dir="auto">Using it normally (in a monolithic application) works fine, but when I try to separate my application into one shared library, which creates a qml_module and is then linked into the main app, it doesnt work anymore. When trying to use the module, which is defined in my library, in my .qml file, I get the compile time error: "module "TestApp.Models" is not installed".</p>
<p dir="auto">I am using QML_ELEMENT in my cpp classes to register it, and:</p>
<pre><code># Qml-Module
qt6_add_qml_module(something
    URI TestApp.Models
    VERSION 1.0
)
</code></pre>
<p dir="auto">to create the module. I then link this module into my main application, by using target_link_libraries</p>
<p dir="auto">I've created a minimal reproducable version of it here: <a href="https://github.com/Creapermann/Temp/" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Creapermann/Temp/</a>. I hope someone knows why this happens.</p>
<p dir="auto">Thanks in advance</p>
]]></description><link>https://forum.qt.io/topic/138504/qt_add_qml_module-not-working-for-windows-when-linked-into-an-app</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 18:58:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/138504.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Aug 2022 14:43:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Fri, 12 Aug 2022 19:25:17 GMT]]></title><description><![CDATA[<p dir="auto">Since it's about the same subject, it would be better to continue over there since the outcome looks good.</p>
]]></description><link>https://forum.qt.io/post/724691</link><guid isPermaLink="true">https://forum.qt.io/post/724691</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 12 Aug 2022 19:25:17 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Fri, 12 Aug 2022 19:27:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> ok, I'll close it here! Thanks</p>
]]></description><link>https://forum.qt.io/post/724692</link><guid isPermaLink="true">https://forum.qt.io/post/724692</guid><dc:creator><![CDATA[Creaperdown]]></dc:creator><pubDate>Fri, 12 Aug 2022 19:27:00 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Fri, 12 Aug 2022 19:25:17 GMT]]></title><description><![CDATA[<p dir="auto">Since it's about the same subject, it would be better to continue over there since the outcome looks good.</p>
]]></description><link>https://forum.qt.io/post/724691</link><guid isPermaLink="true">https://forum.qt.io/post/724691</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 12 Aug 2022 19:25:17 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Fri, 12 Aug 2022 19:11:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a>, we figured out that the other threads problem has the same cause as this. Am I supposed to close this one?</p>
]]></description><link>https://forum.qt.io/post/724690</link><guid isPermaLink="true">https://forum.qt.io/post/724690</guid><dc:creator><![CDATA[Creaperdown]]></dc:creator><pubDate>Fri, 12 Aug 2022 19:11:03 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Fri, 12 Aug 2022 18:37:51 GMT]]></title><description><![CDATA[<p dir="auto">Isn't that the same issue as <a href="https://forum.qt.io/topic/138503/">this thread</a> ?</p>
]]></description><link>https://forum.qt.io/post/724687</link><guid isPermaLink="true">https://forum.qt.io/post/724687</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 12 Aug 2022 18:37:51 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Fri, 12 Aug 2022 16:11:32 GMT]]></title><description><![CDATA[<p dir="auto">Also, I just realized that mingw (what I am using to compile the example), does export all symbols by default. So I dont think thats the problem</p>
]]></description><link>https://forum.qt.io/post/724675</link><guid isPermaLink="true">https://forum.qt.io/post/724675</guid><dc:creator><![CDATA[Creaperdown]]></dc:creator><pubDate>Fri, 12 Aug 2022 16:11:32 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Thu, 11 Aug 2022 18:58:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Oh, my bad. I didnt push the changes. They should be visible now</p>
]]></description><link>https://forum.qt.io/post/724584</link><guid isPermaLink="true">https://forum.qt.io/post/724584</guid><dc:creator><![CDATA[Creaperdown]]></dc:creator><pubDate>Thu, 11 Aug 2022 18:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Thu, 11 Aug 2022 18:52:27 GMT]]></title><description><![CDATA[<p dir="auto">In fact you did not. The documentation explicitly shows you how to create a header file that makes use of the import and export macros Qt provides. Do that first.</p>
]]></description><link>https://forum.qt.io/post/724582</link><guid isPermaLink="true">https://forum.qt.io/post/724582</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 11 Aug 2022 18:52:27 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Thu, 11 Aug 2022 18:48:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Thanks for the reply. I tried following the doucmentation and pushed it to my github repo. If there is anything else that I am missing, please tell me. I have not been actively using export macros before.<br />
Thanks in advance</p>
]]></description><link>https://forum.qt.io/post/724580</link><guid isPermaLink="true">https://forum.qt.io/post/724580</guid><dc:creator><![CDATA[Creaperdown]]></dc:creator><pubDate>Thu, 11 Aug 2022 18:48:27 GMT</pubDate></item><item><title><![CDATA[Reply to qt_add_qml_module not working for windows, when linked into an app on Wed, 10 Aug 2022 17:43:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Since you are creating a library you shall follow the recommendation from the <a href="https://doc.qt.io/qt-6/sharedlibrary.html" target="_blank" rel="noopener noreferrer nofollow ugc">Qt documentation about the shared library creation</a> and not use Q_DECL_EXPORT blindly.</p>
]]></description><link>https://forum.qt.io/post/724414</link><guid isPermaLink="true">https://forum.qt.io/post/724414</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 10 Aug 2022 17:43:34 GMT</pubDate></item></channel></rss>