<?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[Cannot build static Qt6 from source.]]></title><description><![CDATA[<p dir="auto">In order to build I use this .cmd file :</p>
<pre><code>SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
SET SRC_DIR="C:\Qt\6.4.2\Src"
SET BUILD_DIR="C:\Qt\6.4.2\Build2"
SET INSTALL_DIR="C:\Qt\6.4.2.msvc2019_64_static_size"
SET CONFIGURE_OPTIONS=-debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size

call %VS_ENVIRONMENT%
mkdir %BUILD_DIR%
mkdir %INSTALL_DIR%
cd %BUILD_DIR%
call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
cmake --build . --parallel
cmake --install .
cmake --install . --config Debug
cd %INSTALL_DIR%
rmdir %BUILD_DIR% /Q /S
pause
</code></pre>
<p dir="auto">When I executed this in Developer Command Prompt for VS 2022 output is :</p>
<pre><code>C:\Qt\6.4.2\Build2&gt;call "C:\Qt\6.4.2\Src"\configure -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
+ cd qtbase
+ C:\Qt\6.4.2\Src\qtbase\configure.bat -top-level -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
-- Windows 10 SDK version: 10.0.22621.0
'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.4.2.msvc2019_64_static_size' '-DCMAKE_CONFIGURATION_TYPES=Release;Debug' '-DINPUT_msvc_mp=yes' '-DINPUT_static_runtime=yes' '-DINPUT_optimize_size=yes' '-G' 'Ninja Multi-Config' 'C:/Qt/6.4.2/Src'
-- The CXX compiler identification is MSVC 19.33.31630.0
-- The C compiler identification is MSVC 19.33.31630.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Checking dependencies of submodule 'qtbase'
Checking dependencies of submodule 'qtimageformats'
Checking dependencies of submodule 'qtlanguageserver'
Checking dependencies of submodule 'qtshadertools'
Checking dependencies of submodule 'qtsvg'
Checking dependencies of submodule 'qtdeclarative'
Checking dependencies of submodule 'qtquicktimeline'
Checking dependencies of submodule 'qtquick3d'
Checking dependencies of submodule 'qtmultimedia'
Checking dependencies of submodule 'qt3d'
Checking dependencies of submodule 'qt5compat'
Checking dependencies of submodule 'qtactiveqt'
Checking dependencies of submodule 'qtcharts'
Checking dependencies of submodule 'qtcoap'
Checking dependencies of submodule 'qtconnectivity'
Checking dependencies of submodule 'qtdatavis3d'
Checking dependencies of submodule 'qtwebsockets'
Checking dependencies of submodule 'qthttpserver'
Checking dependencies of submodule 'qttools'
Checking dependencies of submodule 'qtdoc'
Checking dependencies of submodule 'qtlottie'
Checking dependencies of submodule 'qtmqtt'
Checking dependencies of submodule 'qtnetworkauth'
Checking dependencies of submodule 'qtopcua'
Checking dependencies of submodule 'qtserialport'
Checking dependencies of submodule 'qtpositioning'
Checking dependencies of submodule 'qtquick3dphysics'
Checking dependencies of submodule 'qtremoteobjects'
Checking dependencies of submodule 'qtscxml'
Checking dependencies of submodule 'qtsensors'
Checking dependencies of submodule 'qtserialbus'
Checking dependencies of submodule 'qtspeech'
Checking dependencies of submodule 'qttranslations'
Checking dependencies of submodule 'qtvirtualkeyboard'
Checking dependencies of submodule 'qtwayland'
Checking dependencies of submodule 'qtwebchannel'
Checking dependencies of submodule 'qtwebengine'
Checking dependencies of submodule 'qtwebview'
Configuring submodule 'qtbase'
CMake Error at C:/Qt/6.4.2/Src/qtbase/cmake/QtProcessConfigureArgs.cmake:965 (message):
  CMake exited with code Access violation.
</code></pre>
]]></description><link>https://forum.qt.io/topic/143449/cannot-build-static-qt6-from-source</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 20:27:16 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/143449.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Mar 2023 19:11:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cannot build static Qt6 from source. on Mon, 06 Mar 2023 19:52:55 GMT]]></title><description><![CDATA[<p dir="auto">I tried but error message was same. As <a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> said, I was using cmake version 3.24.0-rc3. After upgrading the version to cmake version 3.26.0-rc5(latest) it fixed. Thank you for your time</p>
]]></description><link>https://forum.qt.io/post/750158</link><guid isPermaLink="true">https://forum.qt.io/post/750158</guid><dc:creator><![CDATA[FulLT]]></dc:creator><pubDate>Mon, 06 Mar 2023 19:52:55 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot build static Qt6 from source. on Mon, 06 Mar 2023 19:41:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Did you also try with the CMake provided with Qt ?</p>
]]></description><link>https://forum.qt.io/post/750154</link><guid isPermaLink="true">https://forum.qt.io/post/750154</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 06 Mar 2023 19:41:18 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot build static Qt6 from source. on Mon, 06 Mar 2023 19:41:04 GMT]]></title><description><![CDATA[<p dir="auto">What cmake version do you use? Looks like cmake has some problems. Try upgrading to the latest version.</p>
]]></description><link>https://forum.qt.io/post/750153</link><guid isPermaLink="true">https://forum.qt.io/post/750153</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 06 Mar 2023 19:41:04 GMT</pubDate></item></channel></rss>