Building qt5 No Suitable Compiler Found In Path. Windows11 - windows

I'm trying to build qt5 on windows 11 and after running the
..\\configure -developer-build -opensource -nomake examples -nomake tests command it returns No Suitable Compiler Found in Path. Aborting.

Related

QT6 Cross Compile RPI 4

I am trying to cross compile QT for RPI 64 bits on a Mac based on the following instructions:
https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
The issue I am having is that cmake does not recognize 2 libraries:
cannot find -lstdc++
cannot find -lgcc_s
that are located under:
/Volumes/crosstool-ng/aarch64-rpi4-linux-gnu/aarch64-rpi4-linux-gnu/lib64
I use the following command:
../qt6/configure -release -opengl es2 -nomake examples -nomake tests -qt-host-path $HOME/qt-host -extprefix $HOME/qt-raspi -prefix /usr/local/qt6 -device linux-rasp-pi4-aarch64 -device-option CROSS_COMPILE=/Volumes/crosstool-ng/aarch64-rpi4-linux-gnu/bin/aarch64-rpi4-linux-gnu- -- -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain.cmake1 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON
and my toolchain.cmake1 is exactly the one that is in the description link above.
What do I need to add to the toolchain.cmake1 to have these 2 libraries included ?
Thanks

Qt Application resources are missing in static build

I trying to build Qt application under windows statically but after static build application resources are missing (I use custom icons).
I compiled Qt statically using the following commands:
configure -opensource -confirm-license -static -platform win32-g++ -opengl desktop -prefix "C:\Qt\5.13.0\mingw73_64-static" -skip webengine -nomake examples
mingw32-make
mingw32-make install
Using the dynamic version of Qt, everything works, the icons are missing only when I use static version. Icons in .svg format.
Also I tried to Q_INIT_RESOURCE but have the same result :(

Compile QT and append a suffix to the generated DLLs name

Due to this error, I need to compile QT and generate the whole set of libs and DLLs with a custom suffix. Something like Qt5Core_MySuffix.dll, Qt5Gui_MySuffix.dll, Qt5Core_MySuffix.lib, and so on...
How can I do that? I am using this and this tutorials to perform the compilation.
Do I need to edit the configure.bat file?
Environment:
Windows7
MSVC2015
You can do this on configuration step. Where is an option qtlibinfix:
-qtlibinfix <infix> Renames all Qt* libs to Qt*<infix>.
Just add it to the configure command from you link:
configure -static -qtlibinfix MyInFix -debug-and-release -prefix “C:\Qt\Static\5.7.0” -platform win32-msvc2015 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -qt-sql-odbc -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
EDIT: I'm not sure if the BUG with not adding InFix to the Qt plugins is fixed. If not, you can easily fix it yourself. Take a look here

MITK Build Error

I Build manually Qt 4.7.4 64bit and use cmake-gui in window7 make MITK source.
configure.exe -debug-and-release -qt-sql-sqlite -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -mp -nomake examples -nomake demos -nomake docs -opensource -platform win32-msvc2013
after make MITK, I build it use visual studio 2010 64bit
but there is some error like this
Error 91 error : could not find CMAKE_GENERATOR in Cache D:\MITK\MITK-superbuild-msvc2010_x64-03\CUSTOMBUILD
Error 89 error MSB6006: "cmd.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 151
what can I do for solve this problem?
I had similar problem. Those two links were very helpful:
https://www.mail-archive.com/mitk-users#lists.sourceforge.net/msg06034.html
http://sourceforge.net/p/mitk/mailman/message/34233529/
Firstly I downloaded patch.exe from gnuwin32 site. Then I added path to it in system variables.
And using CMake I builded MITK from source file:
MITK-2015.05.0-src-win.zip
During all procedures I blocked my antivirus. Now it's working fine.

Compiling Qt statically on Windows XP and MinGW fail. Is it possible to achieve?

I need to compile Qt statically. I have to do it on a virtual machine running Windows XP. Because of this requirement, I can't use the PowerShell 3.0 script suggested in the wiki page How to build a static Qt for Windows/MinGW (PowerShell 3.0 can't be installed on WinXP).
I tried to read the script and do its work step by step manually.
I added to the end of C:\Qt\5.3\Src\qtbase\mkspecs\win32-g++\qmake.conf file:
# [QT-STATIC-PATCH]
QMAKE_LFLAGS += -static -static-libgcc
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer
DEFINES += QT_STATIC_BUILD
I ran the configuration:
mkdir C:\Qt\5.3\Static-build
cd C:\Qt\5.3\Static-build
..\Src\configure.bat -static -debug-and-release -platform win32-g++ \
-prefix C:\Qt\5.3\Static -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg \
-qt-freetype -opengl desktop -qt-sql-sqlite -no-openssl -opensource \
-confirm-license -make libs -nomake tools -nomake examples -nomake tests
and that seems OK:
This is the Qt for Windows Open Source Edition.
You have already accepted the terms of the license.
Creating qmake...
mingw32-make: Nothing to be done for 'first'.
Running configuration tests...
Environment:
INCLUDE=
Unset
LIB=
Unset
PATH=
C:\Qt\5.3\mingw482_32\bin
C:\Qt\Tools\mingw482_32\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\Program Files\Git\git-cheetah\..\bin
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Git\cmd
C:\Program Files\TortoiseGit\bin
C:\Program Files\CMake\bin
C:\Python27
C:\StrawberryPerl\perl\bin
C:\StrawberryPerl\win32
C:\WINDOWS\system32\WindowsPowerShell\v1.0
Configuration:
pcre
debug
compile_examples
Qt Configuration:
minimal-config
small-config
medium-config
large-config
full-config
debug_and_release build_all release
debug
c++11
static
zlib
gif
jpeg
png
freetype
build_all
accessibility
opengl
audio-backend
native-gestures
qpa
iconv
concurrent
QMAKESPEC...................win32-g++ (commandline)
Architecture................i386, features:
Host Architecture...........i386, features:
Maketool....................mingw32-make
Debug build.................yes (combined)
Default build...............debug
Force debug info............no
C++11 support...............yes
Link Time Code Generation...no
Accessibility support.......yes
RTTI support................yes
SSE2 support................yes
SSE3 support................yes
SSSE3 support...............yes
SSE4.1 support..............yes
SSE4.2 support..............yes
AVX support.................yes
AVX2 support................yes
NEON support................no
IWMMXT support..............no
OpenGL support..............yes
Large File support..........yes
NIS support.................no
Iconv support...............yes
Evdev support...............no
Mtdev support...............no
Inotify support.............no
eventfd(7) support..........no
Glib support................no
CUPS support................no
OpenVG support..............no
OpenSSL support.............no
Qt D-Bus support............no
Qt Widgets module support...yes
Qt GUI module support.......yes
QML debugging...............yes
DirectWrite support.........no
Use system proxies..........no
QPA Backends:
GDI.....................yes
Direct2D................no
Third Party Libraries:
ZLIB support............qt
GIF support.............yes
JPEG support............yes
PNG support.............yes
FreeType support........yes
Fontconfig support......no
HarfBuzz-NG support.....no
PCRE support............qt
ICU support.............no
ANGLE...................no
Dynamic OpenGL..........no
Styles:
Windows.................yes
Windows XP..............yes
Windows Vista...........yes
Fusion..................yes
Windows CE..............no
Windows Mobile..........no
Sql Drivers:
ODBC....................no
MySQL...................no
OCI.....................no
PostgreSQL..............no
TDS.....................no
DB2.....................no
SQLite..................yes (qt)
SQLite2.................no
InterBase...............no
Sources are in..............C:\Qt\5.3\Src\qtbase
Build is done in............C:\Qt\5.3\Static-build\qtbase
Install prefix..............C:\Qt\5.3\Static
Headers installed to........C:\Qt\5.3\Static\include
Libraries installed to......C:\Qt\5.3\Static\lib
Arch-dep. data to...........C:\Qt\5.3\Static
Plugins installed to........C:\Qt\5.3\Static\plugins
Library execs installed to..C:\Qt\5.3\Static\bin
QML1 imports installed to...C:\Qt\5.3\Static\imports
QML2 imports installed to...C:\Qt\5.3\Static\qml
Binaries installed to.......C:\Qt\5.3\Static\bin
Arch-indep. data to.........C:\Qt\5.3\Static
Docs installed to...........C:\Qt\5.3\Static\doc
Translations installed to...C:\Qt\5.3\Static\translations
Examples installed to.......C:\Qt\5.3\Static\examples
Tests installed to..........C:\Qt\5.3\Static\tests
WARNING: Using static linking will disable the use of plugins.
Make sure you compile ALL needed modules into the library.
Generating Makefiles...
Qt is now configured for building. Just run mingw32-make.
To reconfigure, run mingw32-make confclean and configure.
But the compilation with mingw32-make failed at some point:
cd qml/ && ( test -e Makefile || c:/Qt/5.3/Static-build/qtbase/bin/qmake.exe C:/Qt/5.3/Src/qtdeclarative/tools/qml/qml.pro -o
Makefile ) && c:/Qt/Tools/mingw482_32/bin/mingw32-make -f Makefile
'QT_PLUGIN_PATH' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Project ERROR: Failed to parse qmlimportscanner output.
Makefile:94: recipe for target 'sub-qml-make_first' failed
mingw32-make[2]: *** [sub-qml-make_first] Error 3
mingw32-make[2]: Leaving directory 'c:/Qt/5.3/Static-build/qtdeclarative/tools'
Makefile:66: recipe for target 'sub-tools-make_first' failed
mingw32-make[1]: *** [sub-tools-make_first] Error 2
mingw32-make[1]: Leaving directory 'c:/Qt/5.3/Static-build/qtdeclarative'
Makefile:101: recipe for target 'module-qtdeclarative-make_first' failed
mingw32-make: *** [module-qtdeclarative-make_first] Error 2
Sorry for the french wording. The interesting point is:
'QT_PLUGIN_PATH' is not recognized as internal or external command, an executable program or a command file
I found other people having the same issue (here) and tried the solution they suggested (from here):
I added
QMAKE_LFLAGS_STATIC_LIB += -static
to qtbase/mkspecs/win32-g++/qmake.conf and added
static:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB
to qtbase/mkspecs/features/default_post.prf
I still have the error.
So I have 2 questions:
Do you know if it is possible to compile Qt 5.3 on Windows XP with MinGW?
Does someone know how to fix the error 'QT_PLUGIN_PATH' is not recognized [...]?
Ok, for a weird reason, after closing my console, re-opening it and re-trying, it worked :/ I leave this question open in case that someone have a better explanation for "'QT_PLUGIN_PATH' is not recognized [...]" error. Apparently I was not the first to get stuck on this error.

Resources