<?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[Where does the Qt sqlite plugin look for extension libraries]]></title><description><![CDATA[<p dir="auto">I have made the appropriate modification as found in <a href="https://stackoverflow.com/questions/44427868/could-not-load-spatialite-extension-in-qsqlite-qt-5-9" target="_blank" rel="noopener noreferrer nofollow ugc">this thread</a> to enable the Qt sqlite plugin to load extensions. However, when I run <code>SELECT load_extension('spatialite_mod')</code>, I now get the error <code>The specified module could not be found</code></p>
<p dir="auto">On a Windows Qt installation, where do I need to put the <code>spatialite_mod.dll</code> file so that it can be found a runtime? I have already tried putting it in the binary directory without any success.</p>
]]></description><link>https://forum.qt.io/topic/100380/where-does-the-qt-sqlite-plugin-look-for-extension-libraries</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 09:03:03 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/100380.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Mar 2019 16:13:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Wed, 06 Mar 2019 03:01:36 GMT]]></title><description><![CDATA[<p dir="auto">This turned out to be a multi-part problem.</p>
<p dir="auto">The answer to the original question is that Qt looks for the libraries in the working directory (<code>QDir::currentPath()</code>) and in the Windows PATH.</p>
<p dir="auto"><strong>Part 1:</strong></p>
<p dir="auto">On Windows, the <code>specified module could not be found</code> error also can mean that one of mod_spatialite.dll dependencies was not found. In my case, I had forgotten to move these dependencies to the same directory as mod_spatialite.dll. They include:</p>
<ul>
<li>libgcc_s_dw2-1.dll</li>
<li>libstdc++-6.dll</li>
<li>libsqlite3-0.dll</li>
<li>libxml2-2.dll</li>
<li>zlib1.dll</li>
<li>libfreexl-1.dll</li>
<li>libgeos_c-1.dll</li>
<li>libgeos-3-5-0.dll</li>
<li>libiconv-2.dll</li>
<li>liblzma-5.cll</li>
<li>libproj-9.dll</li>
</ul>
<p dir="auto"><strong>Part 2:</strong></p>
<p dir="auto">The <code>libgcc_s_dw2-1.dll</code> and <code>libstdc++-6.dll</code> libraries shipped with libspatialite do not work with Windows 10. Read more about this <a href="http://blog.jrg.com.br/2016/04/25/Fixing-spatialite-loading-problem/" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> and <a href="https://groups.google.com/forum/#!topic/spatialite-users/u2QZpQL_6ek" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. They would crash the program when loaded. The fix for me was to grab the same libraries from my Qt installation at C:\Qt\5.11.3\mingw53_32.</p>
]]></description><link>https://forum.qt.io/post/515564</link><guid isPermaLink="true">https://forum.qt.io/post/515564</guid><dc:creator><![CDATA[j_omega]]></dc:creator><pubDate>Wed, 06 Mar 2019 03:01:36 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Wed, 06 Mar 2019 20:08:57 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the detailed feedback !</p>
]]></description><link>https://forum.qt.io/post/515772</link><guid isPermaLink="true">https://forum.qt.io/post/515772</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 06 Mar 2019 20:08:57 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Wed, 06 Mar 2019 03:01:36 GMT]]></title><description><![CDATA[<p dir="auto">This turned out to be a multi-part problem.</p>
<p dir="auto">The answer to the original question is that Qt looks for the libraries in the working directory (<code>QDir::currentPath()</code>) and in the Windows PATH.</p>
<p dir="auto"><strong>Part 1:</strong></p>
<p dir="auto">On Windows, the <code>specified module could not be found</code> error also can mean that one of mod_spatialite.dll dependencies was not found. In my case, I had forgotten to move these dependencies to the same directory as mod_spatialite.dll. They include:</p>
<ul>
<li>libgcc_s_dw2-1.dll</li>
<li>libstdc++-6.dll</li>
<li>libsqlite3-0.dll</li>
<li>libxml2-2.dll</li>
<li>zlib1.dll</li>
<li>libfreexl-1.dll</li>
<li>libgeos_c-1.dll</li>
<li>libgeos-3-5-0.dll</li>
<li>libiconv-2.dll</li>
<li>liblzma-5.cll</li>
<li>libproj-9.dll</li>
</ul>
<p dir="auto"><strong>Part 2:</strong></p>
<p dir="auto">The <code>libgcc_s_dw2-1.dll</code> and <code>libstdc++-6.dll</code> libraries shipped with libspatialite do not work with Windows 10. Read more about this <a href="http://blog.jrg.com.br/2016/04/25/Fixing-spatialite-loading-problem/" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> and <a href="https://groups.google.com/forum/#!topic/spatialite-users/u2QZpQL_6ek" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. They would crash the program when loaded. The fix for me was to grab the same libraries from my Qt installation at C:\Qt\5.11.3\mingw53_32.</p>
]]></description><link>https://forum.qt.io/post/515564</link><guid isPermaLink="true">https://forum.qt.io/post/515564</guid><dc:creator><![CDATA[j_omega]]></dc:creator><pubDate>Wed, 06 Mar 2019 03:01:36 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Tue, 05 Mar 2019 20:43:03 GMT]]></title><description><![CDATA[<p dir="auto">Can you provide a minimal compilable example ?<br />
This way we may also test on our end to find out.</p>
]]></description><link>https://forum.qt.io/post/515510</link><guid isPermaLink="true">https://forum.qt.io/post/515510</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 05 Mar 2019 20:43:03 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Tue, 05 Mar 2019 20:36:38 GMT]]></title><description><![CDATA[<p dir="auto">What about relative to your driver?  I see that they get the driver from the DB object so my guess is either relative to the driver or the .db file.</p>
<p dir="auto">For example when running through the qt creator IDE it should look at the folder which contains the sql drivers(unless you have put your dependencies in your local build folder).</p>
<p dir="auto">On my Qt version 5.12.0 64 bit mingw that folder is located here: C:\Qt\5.12.0\mingw73_64\plugins\sqldrivers</p>
<p dir="auto">Did you try that?</p>
<p dir="auto">I tried googling a bit and only see code examples but no statements on WHERE the extension should be placed...</p>
]]></description><link>https://forum.qt.io/post/515508</link><guid isPermaLink="true">https://forum.qt.io/post/515508</guid><dc:creator><![CDATA[MrShawn]]></dc:creator><pubDate>Tue, 05 Mar 2019 20:36:38 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Tue, 05 Mar 2019 20:23:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrshawn">@<bdi>MrShawn</bdi></a> Yes, I tried that. I also tried one directory higher since that is what <code>QDir::currentPath()</code> returns when called immediately before the <code>load_extension</code> call.</p>
]]></description><link>https://forum.qt.io/post/515503</link><guid isPermaLink="true">https://forum.qt.io/post/515503</guid><dc:creator><![CDATA[j_omega]]></dc:creator><pubDate>Tue, 05 Mar 2019 20:23:39 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Tue, 05 Mar 2019 20:16:42 GMT]]></title><description><![CDATA[<p dir="auto">Did you place it in the application directory folder?</p>
]]></description><link>https://forum.qt.io/post/515502</link><guid isPermaLink="true">https://forum.qt.io/post/515502</guid><dc:creator><![CDATA[MrShawn]]></dc:creator><pubDate>Tue, 05 Mar 2019 20:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Tue, 05 Mar 2019 19:56:02 GMT]]></title><description><![CDATA[<p dir="auto">Yes, I have tried both of these options as well as adding ".dll" to the end.</p>
]]></description><link>https://forum.qt.io/post/515495</link><guid isPermaLink="true">https://forum.qt.io/post/515495</guid><dc:creator><![CDATA[j_omega]]></dc:creator><pubDate>Tue, 05 Mar 2019 19:56:02 GMT</pubDate></item><item><title><![CDATA[Reply to Where does the Qt sqlite plugin look for extension libraries on Tue, 05 Mar 2019 19:40:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Did you try to pass the full file path ?</p>
<p dir="auto">Or if you have it one the same folder as your application, "./name.dll".</p>
]]></description><link>https://forum.qt.io/post/515488</link><guid isPermaLink="true">https://forum.qt.io/post/515488</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 05 Mar 2019 19:40:38 GMT</pubDate></item></channel></rss>