<?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[How to compile qt static source?]]></title><description><![CDATA[<p dir="auto">I'm trying to follow the tutorial found here: <a href="https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW</a></p>
<p dir="auto">I already have qt 6.3.1 installed, i download the PowerShell script and changed it to:</p>
<pre><code>[CmdletBinding()]
param(
    $QtSrcUrl = "https://download.qt.io/official_releases/qt/6.3/6.3.1/single/qt-everywhere-src-6.3.1.zip",
    $QtStaticDir = "C:\Qt\Static", # NO TRAILING SLASH
    $QtVersion = "6.3.1", #If you change this, you'll need to change the URL above to download as well...
    $MingwDir = "C:\Qt\Tools\mingw1120_64",
    [switch]$NoPause = $false
)
</code></pre>
<p dir="auto">Im getting this error:</p>
<pre><code>Out-File : Could not find a part of the path 'C:\Qt\Static\6.3.1\mkspecs\win32-g++\qmake.conf'.
At C:\Qt\qt-windows10-static-build.ps1:167 char:6
+ "@ | Out-File -Append $File -Encoding Ascii
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (:) [Out-File], DirectoryNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
</code></pre>
<p dir="auto">The folder <code>C:\Qt\Static\6.3.1</code> is <strong>empty</strong>, why does the ps script is searching for something inside of it?</p>
]]></description><link>https://forum.qt.io/topic/139175/how-to-compile-qt-static-source</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 10:29:25 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139175.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Sep 2022 23:24:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to compile qt static source? on Sat, 10 Sep 2022 00:03:49 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Qt binaries which will be generated during the build.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Could you point out the binaries needed to compile the static version containing everything the release version has?</p>
<p dir="auto">I was able to compile it using visual studio with the following commands:</p>
<pre><code>configure.bat -static -debug-and-release -platform win32-msvc -opensource -confirm-license -prefix "C:\Qt\Static"
cmake --build . --parallel
cmake --install .
</code></pre>
<p dir="auto">I compiled to test a new "empty project" as static/release and its size is 14MB, is possible somehow to 'optimize' it? i mean any flag, option, etc?</p>
]]></description><link>https://forum.qt.io/post/728068</link><guid isPermaLink="true">https://forum.qt.io/post/728068</guid><dc:creator><![CDATA[Karine]]></dc:creator><pubDate>Sat, 10 Sep 2022 00:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to How to compile qt static source? on Fri, 09 Sep 2022 08:58:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cesar">@<bdi>Cesar</bdi></a> said in <a href="/post/728030">How to compile qt static source?</a>:</p>
<blockquote>
<p dir="auto">I must change qt6-build to the path where I saved the source?</p>
</blockquote>
<p dir="auto">No, this is the build folder. configure.bat script is inside the source folder. So:</p>
<pre><code>..\qt-everywhere-src-6.3.1\configure.bat -prefix C:\path\to\install
</code></pre>
<p dir="auto">"What goes on C:\path\to\install?" - Qt binaries which will be generated during the build.</p>
<p dir="auto">If you're building using Microsoft compiler then don't forget: "Make sure to open the correct command prompt (e.g. 'x64 Native Tools Command Prompt for VS 2022')".</p>
]]></description><link>https://forum.qt.io/post/728031</link><guid isPermaLink="true">https://forum.qt.io/post/728031</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 09 Sep 2022 08:58:07 GMT</pubDate></item><item><title><![CDATA[Reply to How to compile qt static source? on Fri, 09 Sep 2022 08:54:49 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, I'm helping she, we have visual studio 2022, and I installed all the pre-requisites, python, pearl, etc, I know how to run the developer command prompt</p>
<pre><code>&gt; mkdir qt6-build
&gt; cd qt6-build
&gt; ..\qt6\configure.bat -prefix C:\path\to\install
&gt; cmake --build .
&gt; cmake --install .
</code></pre>
<p dir="auto">I must change <strong>qt6-build</strong> to the path where I saved the source? i mean the <code>qt-everywhere-src-6.3.1</code> folder?</p>
<pre><code>&gt; mkdir qt6-build
&gt; cd C:\Qt\Static\src\qt-everywhere-src-6.3.1
&gt; C:\Qt\Static\src\qt-everywhere-src-6.3.1\configure.bat -prefix C:\path\to\install // &lt;- ??
&gt; cmake --build .
&gt; cmake --install .
</code></pre>
<p dir="auto">What goes on <code>C:\path\to\install</code>?<br />
I'm confused about how to use these commands, i have no experience compiling projects like this.</p>
]]></description><link>https://forum.qt.io/post/728030</link><guid isPermaLink="true">https://forum.qt.io/post/728030</guid><dc:creator><![CDATA[Cesar]]></dc:creator><pubDate>Fri, 09 Sep 2022 08:54:49 GMT</pubDate></item><item><title><![CDATA[Reply to How to compile qt static source? on Fri, 09 Sep 2022 02:10:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi, and welcome!</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/karine">@<bdi>Karine</bdi></a> said in <a href="/post/727979">How to compile qt static source?</a>:</p>
<blockquote>
<p dir="auto">The folder <code>C:\Qt\Static\6.3.1</code> is <strong>empty</strong>, why does the ps script is searching for something inside of it?</p>
</blockquote>
<p dir="auto">I've never used that script before (note that it is not official), but it looks like it was written for Qt 5.</p>
<p dir="auto">Qt 6 needs CMake to build. Do you have CMake and Ninja in your PATH?</p>
<p dir="auto">Anyway, try calling <code>configure.bat</code> directly (copy the command from the script) and check the output logs.</p>
<p dir="auto">See <a href="https://wiki.qt.io/Building_Qt_6_from_Git#On_Windows:" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/Building_Qt_6_from_Git#On_Windows:</a> for more details about building Qt 6.</p>
]]></description><link>https://forum.qt.io/post/727986</link><guid isPermaLink="true">https://forum.qt.io/post/727986</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 09 Sep 2022 02:10:53 GMT</pubDate></item></channel></rss>