<?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[Problems with building]]></title><description><![CDATA[<p dir="auto">Hi, I recently compiled Qt 6.5.2 Static from source on Windows. But when I try to use it, I get strange errors.</p>
<p dir="auto">While trying to compile it, I ran into a few issues. Firstly, (strawberry) perl wasn't working, so I used MinGW (mingw1120_64) included in the Tools folder that the maintenance tool made and that worked. I got a warning that without perl some stuff doesn't have to work properly. Secondly, I got an error that <code>QtWebEngine</code> won't be built, but I don't remember what was the error (QtPdf also didn't build, because I don't have nodejs 12.0 installed, but I don't care about that). The build process also stopped once, because I ran out of storage space.</p>
<p dir="auto">Anyway, here are the errors that I'm currently facing:</p>
<pre><code>error: C:\Qt\6.5.2-static\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x6a): undefined reference to `__imp_VariantInit'

error: C:\Qt\6.5.2-static\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x13d): undefined reference to `__imp_VariantClear'

error: C:\Qt\6.5.2-static\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x1ea): undefined reference to `__imp_VariantClear'

error: C:\Qt\6.5.2-static\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x261): undefined reference to `__imp_VariantClear'
</code></pre>
<p dir="auto">Edit:<br />
I forgot to mention, this is the modules included in my .pro file: <code>core gui websockets network</code></p>
<p dir="auto">And the included files in my header file (not everything):</p>
<pre><code>#include &lt;QtWebSockets/QWebSocket&gt;
#include &lt;QJsonObject&gt;
#include &lt;QJsonDocument&gt;
#include &lt;QDebug&gt;
#include &lt;QHostInfo&gt;
#include &lt;QNetworkInterface&gt;
</code></pre>
]]></description><link>https://forum.qt.io/topic/149255/problems-with-building</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 20:04:20 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/149255.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Sep 2023 15:11:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problems with building on Thu, 18 Apr 2024 11:14:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/the-smiling-mickey">@<bdi>The-Smiling-Mickey</bdi></a> I also had the same problem with static Qt 6.7. I found the  -loleaut32 needs to be <em>after</em> the libqnetworklistmanager.a.</p>
<p dir="auto">My 'quick-fix' solution is to add -loleaut32 to the list of lib dependencies (QMAKE_PRL_LIBS) in &lt;qt6.x-static dir&gt;/plugins/networkinformation/qnetworklistmanager.prl</p>
<p dir="auto">The root of the problem seems to lie in Src/qtbase/src/plugins/networkinformation/networklistmanager/CMakeLists.txt, which adds the additional Windows dependencies for MSVC but not MINGW. Fiddling with that I managed recompile the Qt 6.7 Static build so that the right dependency ends up in qnetworklistmanager.prl. But I don't know my way around the CMakeLists, so I won't bother listing that change here; and the quick fix above is simpler anyway.</p>
]]></description><link>https://forum.qt.io/post/797148</link><guid isPermaLink="true">https://forum.qt.io/post/797148</guid><dc:creator><![CDATA[asacloud]]></dc:creator><pubDate>Thu, 18 Apr 2024 11:14:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with building on Sat, 18 Nov 2023 03:10:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a><br />
how i change the order in static</p>
]]></description><link>https://forum.qt.io/post/780074</link><guid isPermaLink="true">https://forum.qt.io/post/780074</guid><dc:creator><![CDATA[jchaviano]]></dc:creator><pubDate>Sat, 18 Nov 2023 03:10:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with building on Tue, 14 Nov 2023 17:46:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> Yeah, according to the compile output oleaut32 comes before qnetworklistmanager.</p>
]]></description><link>https://forum.qt.io/post/779730</link><guid isPermaLink="true">https://forum.qt.io/post/779730</guid><dc:creator><![CDATA[The Smiling Mickey]]></dc:creator><pubDate>Tue, 14 Nov 2023 17:46:26 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with building on Tue, 14 Nov 2023 15:54:36 GMT]]></title><description><![CDATA[<p dir="auto">When linking static the order of the libs is important. Imo it must be before libqnetworklistmanager.a<br />
Or even simpler - use dynamic linking.</p>
]]></description><link>https://forum.qt.io/post/779722</link><guid isPermaLink="true">https://forum.qt.io/post/779722</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Tue, 14 Nov 2023 15:54:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with building on Tue, 14 Nov 2023 14:52:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> Turns out one of the qt files already adds the linkage -loleaut32. Adding it to the pro file does nothing. Still get the same error message. Tested the function Variantinit in debug mode with dynamic linkage so OleAut32.lib seems to be working.</p>
]]></description><link>https://forum.qt.io/post/779717</link><guid isPermaLink="true">https://forum.qt.io/post/779717</guid><dc:creator><![CDATA[The Smiling Mickey]]></dc:creator><pubDate>Tue, 14 Nov 2023 14:52:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with building on Mon, 13 Nov 2023 18:12:13 GMT]]></title><description><![CDATA[<p dir="auto">The missing functions come from windows: <a href="https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-variantinit" target="_blank" rel="noopener noreferrer nofollow ugc">https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-variantinit</a> so you should link against oleauth lib as described in the msdn documentation.</p>
]]></description><link>https://forum.qt.io/post/779646</link><guid isPermaLink="true">https://forum.qt.io/post/779646</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 13 Nov 2023 18:12:13 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with building on Mon, 13 Nov 2023 18:00:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sucharek">@<bdi>Sucharek</bdi></a> I am trying to build a static file as well. I built static Qt 6.6 from source on Windows and I'm getting the exact same errors.  The modules included in my program are quick and opengl. I don't understand why any network stuff is even being linked in my case. It would be cool if anyone could point out what we are possibly missing.</p>
]]></description><link>https://forum.qt.io/post/779641</link><guid isPermaLink="true">https://forum.qt.io/post/779641</guid><dc:creator><![CDATA[The Smiling Mickey]]></dc:creator><pubDate>Mon, 13 Nov 2023 18:00:04 GMT</pubDate></item></channel></rss>