[Qt6][Windows] How To Clean Build in Source Dir
-
Hi all,
I am trying to build Qt6 source statically on Windows platform. After configuration is done, I got some errors in build step. And I want to clean my build directory before rebuild.
In Qt docs, it is described as ;
If you later need to reconfigure and rebuild Qt from the same location, ensure that all traces of the previous configuration are removed by entering the build directory and running nmake distclean or mingw32-make distclean before running configure again.But there is no any makefile in my source directory to be able run. As a result when I tried to run
mingw32-make distclean
I receive an error that makefile couldn't find.How can I clean my build directory before rebuilding ? Why don't I have a makefile in my build folder ?
Meanwhile, I tried to make clean with cmake with below command. But I think that's not what I need.
>cmake --build . --target clean [2/2] Cleaning all built files... Cleaning... 486 files.
Configure and build commands I have used ;
>configure -static -release -prefix C:\QtStatic -skip qttranslations,qtdoc,qttools,qt3d,qtlanguageserver,qtmqtt,qtmultimedia,qtquick3d,qtquicktimeline,qtsensors,qtvirtualkeyboard,qtwebchannel,qtwebsockets,qtwebview >cmake --build . --parallel
You can see my source directory below.
06/13/2023 01:10 AM <DIR> . 06/13/2023 01:10 AM <DIR> .. 09/07/2022 03:40 PM 6,951 .gitmodules 06/13/2023 12:55 AM 719 .ninja_log 06/13/2023 12:54 AM <DIR> .qt 09/07/2022 06:20 PM 108,239 .QT-ENTERPRISE-LICENSE-AGREEMENT 09/07/2022 03:40 PM 42 .tag 06/13/2023 12:54 AM 23,880,454 build.ninja 06/13/2023 12:18 AM <DIR> cmake 06/13/2023 12:53 AM 215,804 CMakeCache.txt 06/13/2023 12:54 AM <DIR> CMakeFiles 09/07/2022 03:40 PM 4,211 CMakeLists.txt 06/13/2023 12:54 AM 4,914 cmake_install.cmake 06/13/2023 12:18 AM <DIR> coin 09/07/2022 03:40 PM 2,040 conanfile_profiles.py 06/13/2023 12:51 AM 210 config.opt 06/13/2023 12:51 AM 216 config.opt.in 06/13/2023 12:53 AM 11,740 config.summary 06/13/2023 12:53 AM <DIR> config.tests 09/07/2022 03:40 PM 1,610 configure 09/07/2022 03:40 PM 1,721 configure.bat 09/07/2022 03:40 PM 101 configure.json 06/13/2023 12:54 AM 739 CTestTestfile.cmake 09/07/2022 03:40 PM 18,431 LICENSE.GPL2 09/07/2022 03:40 PM 35,821 LICENSE.GPL3 09/07/2022 03:40 PM 37,067 LICENSE.GPL3-EXCEPT 09/07/2022 03:40 PM 7,816 LICENSE.LGPL3 09/07/2022 03:40 PM 108,239 LICENSE.QT-LICENSE-AGREEMENT 06/13/2023 12:18 AM <DIR> qt3d 06/13/2023 12:54 AM <DIR> qt5compat 06/13/2023 01:10 AM 0 qt6vars.cmd.txt 06/13/2023 12:54 AM <DIR> qtactiveqt 06/13/2023 12:54 AM <DIR> qtbase 06/13/2023 12:54 AM <DIR> qtcharts 06/13/2023 12:54 AM <DIR> qtcoap 06/13/2023 12:54 AM <DIR> qtconnectivity 06/13/2023 12:54 AM <DIR> qtdatavis3d 06/13/2023 12:54 AM <DIR> qtdeclarative 06/13/2023 12:22 AM <DIR> qtdoc 06/13/2023 12:54 AM <DIR> qtimageformats 06/13/2023 12:22 AM <DIR> qtlanguageserver 06/13/2023 12:54 AM <DIR> qtlottie 06/13/2023 12:22 AM <DIR> qtmqtt 06/13/2023 12:22 AM <DIR> qtmultimedia 06/13/2023 12:54 AM <DIR> qtnetworkauth 06/13/2023 12:54 AM <DIR> qtopcua 06/13/2023 12:54 AM <DIR> qtpositioning 06/13/2023 12:22 AM <DIR> qtquick3d 06/13/2023 12:22 AM <DIR> qtquicktimeline 06/13/2023 12:54 AM <DIR> qtremoteobjects 06/13/2023 12:54 AM <DIR> qtscxml 06/13/2023 12:22 AM <DIR> qtsensors 06/13/2023 12:54 AM <DIR> qtserialbus 06/13/2023 12:54 AM <DIR> qtserialport 06/13/2023 12:54 AM <DIR> qtshadertools 06/13/2023 12:54 AM <DIR> qtsvg 06/13/2023 12:22 AM <DIR> qttools 06/13/2023 12:22 AM <DIR> qttranslations 06/13/2023 12:22 AM <DIR> qtvirtualkeyboard 06/13/2023 12:54 AM <DIR> qtwayland 06/13/2023 12:23 AM <DIR> qtwebchannel 06/13/2023 12:54 AM <DIR> qtwebengine 06/13/2023 12:31 AM <DIR> qtwebsockets 06/13/2023 12:31 AM <DIR> qtwebview 09/07/2022 03:40 PM 3,126 README.md 09/07/2022 03:40 PM 3,061 _clang-format 24 File(s) 24,453,272 bytes 42 Dir(s) 87,016,062,976 bytes frees
-
Hi all,
I am trying to build Qt6 source statically on Windows platform. After configuration is done, I got some errors in build step. And I want to clean my build directory before rebuild.
In Qt docs, it is described as ;
If you later need to reconfigure and rebuild Qt from the same location, ensure that all traces of the previous configuration are removed by entering the build directory and running nmake distclean or mingw32-make distclean before running configure again.But there is no any makefile in my source directory to be able run. As a result when I tried to run
mingw32-make distclean
I receive an error that makefile couldn't find.How can I clean my build directory before rebuilding ? Why don't I have a makefile in my build folder ?
Meanwhile, I tried to make clean with cmake with below command. But I think that's not what I need.
>cmake --build . --target clean [2/2] Cleaning all built files... Cleaning... 486 files.
Configure and build commands I have used ;
>configure -static -release -prefix C:\QtStatic -skip qttranslations,qtdoc,qttools,qt3d,qtlanguageserver,qtmqtt,qtmultimedia,qtquick3d,qtquicktimeline,qtsensors,qtvirtualkeyboard,qtwebchannel,qtwebsockets,qtwebview >cmake --build . --parallel
You can see my source directory below.
06/13/2023 01:10 AM <DIR> . 06/13/2023 01:10 AM <DIR> .. 09/07/2022 03:40 PM 6,951 .gitmodules 06/13/2023 12:55 AM 719 .ninja_log 06/13/2023 12:54 AM <DIR> .qt 09/07/2022 06:20 PM 108,239 .QT-ENTERPRISE-LICENSE-AGREEMENT 09/07/2022 03:40 PM 42 .tag 06/13/2023 12:54 AM 23,880,454 build.ninja 06/13/2023 12:18 AM <DIR> cmake 06/13/2023 12:53 AM 215,804 CMakeCache.txt 06/13/2023 12:54 AM <DIR> CMakeFiles 09/07/2022 03:40 PM 4,211 CMakeLists.txt 06/13/2023 12:54 AM 4,914 cmake_install.cmake 06/13/2023 12:18 AM <DIR> coin 09/07/2022 03:40 PM 2,040 conanfile_profiles.py 06/13/2023 12:51 AM 210 config.opt 06/13/2023 12:51 AM 216 config.opt.in 06/13/2023 12:53 AM 11,740 config.summary 06/13/2023 12:53 AM <DIR> config.tests 09/07/2022 03:40 PM 1,610 configure 09/07/2022 03:40 PM 1,721 configure.bat 09/07/2022 03:40 PM 101 configure.json 06/13/2023 12:54 AM 739 CTestTestfile.cmake 09/07/2022 03:40 PM 18,431 LICENSE.GPL2 09/07/2022 03:40 PM 35,821 LICENSE.GPL3 09/07/2022 03:40 PM 37,067 LICENSE.GPL3-EXCEPT 09/07/2022 03:40 PM 7,816 LICENSE.LGPL3 09/07/2022 03:40 PM 108,239 LICENSE.QT-LICENSE-AGREEMENT 06/13/2023 12:18 AM <DIR> qt3d 06/13/2023 12:54 AM <DIR> qt5compat 06/13/2023 01:10 AM 0 qt6vars.cmd.txt 06/13/2023 12:54 AM <DIR> qtactiveqt 06/13/2023 12:54 AM <DIR> qtbase 06/13/2023 12:54 AM <DIR> qtcharts 06/13/2023 12:54 AM <DIR> qtcoap 06/13/2023 12:54 AM <DIR> qtconnectivity 06/13/2023 12:54 AM <DIR> qtdatavis3d 06/13/2023 12:54 AM <DIR> qtdeclarative 06/13/2023 12:22 AM <DIR> qtdoc 06/13/2023 12:54 AM <DIR> qtimageformats 06/13/2023 12:22 AM <DIR> qtlanguageserver 06/13/2023 12:54 AM <DIR> qtlottie 06/13/2023 12:22 AM <DIR> qtmqtt 06/13/2023 12:22 AM <DIR> qtmultimedia 06/13/2023 12:54 AM <DIR> qtnetworkauth 06/13/2023 12:54 AM <DIR> qtopcua 06/13/2023 12:54 AM <DIR> qtpositioning 06/13/2023 12:22 AM <DIR> qtquick3d 06/13/2023 12:22 AM <DIR> qtquicktimeline 06/13/2023 12:54 AM <DIR> qtremoteobjects 06/13/2023 12:54 AM <DIR> qtscxml 06/13/2023 12:22 AM <DIR> qtsensors 06/13/2023 12:54 AM <DIR> qtserialbus 06/13/2023 12:54 AM <DIR> qtserialport 06/13/2023 12:54 AM <DIR> qtshadertools 06/13/2023 12:54 AM <DIR> qtsvg 06/13/2023 12:22 AM <DIR> qttools 06/13/2023 12:22 AM <DIR> qttranslations 06/13/2023 12:22 AM <DIR> qtvirtualkeyboard 06/13/2023 12:54 AM <DIR> qtwayland 06/13/2023 12:23 AM <DIR> qtwebchannel 06/13/2023 12:54 AM <DIR> qtwebengine 06/13/2023 12:31 AM <DIR> qtwebsockets 06/13/2023 12:31 AM <DIR> qtwebview 09/07/2022 03:40 PM 3,126 README.md 09/07/2022 03:40 PM 3,061 _clang-format 24 File(s) 24,453,272 bytes 42 Dir(s) 87,016,062,976 bytes frees
@BosGemiler said in [Qt6][Windows] How To Clean Build in Source Dir:
But there is no any makefile in my source directory to be able run
Not source directory, "build directory". Build directory is the folder from which your calling configure and cmake.
-
@BosGemiler said in [Qt6][Windows] How To Clean Build in Source Dir:
But there is no any makefile in my source directory to be able run
Not source directory, "build directory". Build directory is the folder from which your calling configure and cmake.
@jsulm Hi,
you are right. But I used Src folder as Build directory in this case. In linux, the build directory was the path in where I call configure. But when I tried it in Windows, I couldn't achieve the same result, somehow all outputs are extracted to Src folder.
I tried it again. First, I create a build dir, and moved to this path in cmd, and then run configure, and I saw in output prints that build files are located to Src folder.
>Build files have been written to: C:/Qt/6.3.2/Src
and the files in build dir ;
qtbase, config.opt, config.opt.in
-
@jsulm Hi,
you are right. But I used Src folder as Build directory in this case. In linux, the build directory was the path in where I call configure. But when I tried it in Windows, I couldn't achieve the same result, somehow all outputs are extracted to Src folder.
I tried it again. First, I create a build dir, and moved to this path in cmd, and then run configure, and I saw in output prints that build files are located to Src folder.
>Build files have been written to: C:/Qt/6.3.2/Src
and the files in build dir ;
qtbase, config.opt, config.opt.in
@BosGemiler said in [Qt6][Windows] How To Clean Build in Source Dir:
But I used Src folder as Build directory in this case
Which is bad. So in what directory are you exactly when you call configure? All the configure/build artefacts are in that directory.
And actually there is build.ninja file generated in the folder you're showing which means that you're using Ninja to build. -
@BosGemiler said in [Qt6][Windows] How To Clean Build in Source Dir:
But I used Src folder as Build directory in this case
Which is bad. So in what directory are you exactly when you call configure? All the configure/build artefacts are in that directory.
And actually there is build.ninja file generated in the folder you're showing which means that you're using Ninja to build.@jsulm said
Which is bad.
Definitely :)
Okay, I removed Src folder and reinstalled it via qt-maintenance tool. Then, I followed same steps again to configure & build. Now, I can see outputs in my Build dir as expected. -
B BosGemiler has marked this topic as solved on