[SOLVED] Merging installation of Qt4.8 and Qt5.2
-
Hello, I need to be able compile a project that uses Qt4 but is incompatible with Qt5 and a project in Qt5 that is not retro-compatible. I firstly needed the Qt5 project, so that's the one I installed first. Unfortunately the package manager does propose to install Qt4.8¹. After two days of painful downloading, I finally downloaded Qt4.8. I also downloaded and extracted MinGW4.4.0 in C:\Qt\Tools\mingw44_32, and pointed the Qt4 installer to this version of MinGW. But now my Qt5 project won't compile with the following error :
@11:58:12: The process "mingw32-make.exe" exited with code -1.
Error while building/deploying project GLGIS (kit: Desktop Qt 5.2.1 MinGW 32bit)@My project kit seems okay, though :
@Name: Desktop Qt 5.2.1 MinGW 32bit
Device type: Desktop
Device: Local PC (default for Desktop)
Sysroot:
Compiler: MinGW 4.8 32bit //Note, different from MinGW 4.4, this is the formely auto-detected MinGW
Debugger: Extracted from Kit Desktop Qt 5.2.1 MinGW 32bit
Qt version: Qt 5.2.1 MinGW 32 bit
Qt mkspec:@Of course taking two more days to re-download Qt5 is not the easy solution.
EDIT: Woops, wrong posting place ! Could someone move the subject please ?
¹ But why not ???
-
Hi,
If I may, you should rather install one of Qt 4.8.6 snapshot from "here":http://download.qt-project.org/snapshots/qt/4.8/
That way you don't need to have several version of mingw-installed.
If not possible, check that you don't have MinGW 4.4 in your PATH, if so, remove it.
-
No unfortunately I haven't MinGW in my path but thank you for the suggestion.
Anyway the damage is done; I don't think uninstall Qt4.8 will fix it; what else can I check ? is there any other variable that both Qt4.8 and Qt5.2 write ?
EDIT: Nay, uninstalling Qt4.8 does not change a damn thing, I have the same error.
-
I would double check the Kits and the Compilers panel in the preferences to see whether all compilers are correctly listed and the Kits to verify that current compiler associated with Qt is the correct one
-
Nothing to see there either !
The Qt version with the same name as linked above :
@name : Qt 5.2.1 MinGW 32bit
qmake location:C:\Qt\5.2.1\mingw48_32\bin\qmake.exeQt version for desktop:
Name:
Qt 5.2.1 MinGW 32bit
ABI:
x86-windows-msys-pe-32bit
Source:
C:\Qt\5.2.1\mingw48_32
mkspec:
win32-g++
qmake:
C:\Qt\5.2.1\mingw48_32\bin\qmake.exe
Version:
5.2.1
QMAKE_SPEC
win32-g++
QMAKE_VERSION
3.0
QMAKE_XSPEC
win32-g++
QT_HOST_BINS
C:\Qt\5.2.1\mingw48_32\bin
QT_HOST_DATA
C:\Qt\5.2.1\mingw48_32
QT_HOST_LIBS
C:\Qt\5.2.1\mingw48_32\lib
QT_HOST_PREFIX
C:\Qt\5.2.1\mingw48_32
QT_INSTALL_ARCHDATA
C:\Qt\5.2.1\mingw48_32
QT_INSTALL_BINS
C:\Qt\5.2.1\mingw48_32\bin
QT_INSTALL_CONFIGURATIONQT_INSTALL_DATA
C:\Qt\5.2.1\mingw48_32
QT_INSTALL_DEMOS
C:\Qt\5.2.1\mingw48_32\examples
QT_INSTALL_DOCS
C:\Qt\5.2.1\mingw48_32\doc
QT_INSTALL_EXAMPLES
C:\Qt\5.2.1\mingw48_32\examples
QT_INSTALL_HEADERS
C:\Qt\5.2.1\mingw48_32\include
QT_INSTALL_IMPORTS
C:\Qt\5.2.1\mingw48_32\imports
QT_INSTALL_LIBEXECS
C:\Qt\5.2.1\mingw48_32\libexec
QT_INSTALL_LIBS
C:\Qt\5.2.1\mingw48_32\lib
QT_INSTALL_PLUGINS
C:\Qt\5.2.1\mingw48_32\plugins
QT_INSTALL_PREFIX
C:\Qt\5.2.1\mingw48_32
QT_INSTALL_QML
C:\Qt\5.2.1\mingw48_32\qml
QT_INSTALL_TESTS
C:\Qt\5.2.1\mingw48_32\tests
QT_INSTALL_TRANSLATIONS
C:\Qt\5.2.1\mingw48_32\translations
QT_SYSROOTQT_VERSION
5.2.1@The MinGW version with the same name as linked above :
@Name: MinGW 4.8 32bit
Compiler path: C:\Qt\Tools\mingw48_32\bin\g++.exe
Platform Codegen Flags:
Platform Linker Flags:
ABI:x86-windows-msys-pe-32bit@ -
Got it during my installation I removed without realizing it the directory mingw48_32 to only mingw44_32. But now I have to reinstall Mingw4.8, but the Qt package manager cannot reinstall ! I must uninstall the whole Qt5 because of brainless (understand: unavoidable) dependency check and do a full reinstall of it (which means at least 2 days of downloading in my current situation… :'( ).
Thank you for previous help.
It there is an advice on how to do the equivalent of "apt-get reinstall -y gcc" or "yum reinstall -y gcc" or "pacman -S gcc" with the Qt package manager for windows, I'm listening !
EDIT: or how to hack to make it think that only :MinGW is not installed, or the address where the package it downloads is manually downloadable so I can silently fix, or (…)
-
Ok, I found it there and extracted it :
http://download.qt-project.org/online/qt5/windows/x86/online_repository/qt.tools.win32_mingw48
-But I'm still unable to compile anew… Here is a sample of the new error I get :-
@Makefile.Release:151: recipe for target 'compiler_rcc_clean' failed
process_begin: CreateProcess(NULL, del release\qrc_shaders.cpp, ...) failed.
make (e=2): The system cannot find the file specified.mingw32-make[1]: [compiler_rcc_clean] Error 2 (ignored)
del release\moc_glviewer.cpp release\moc_layer.cpp release\moc_unoptimizedlayer.cpp release\moc_polygonlayer.cpp release\moc_simpleshaderlayer.cpp release\moc_terrainlayer.cpp@EDIT : rebuild in another directory and it seems to work. Many thanks for the motivation.
-
You're welcome !
As an alternative you may use the online installer which will allow you to more easily update and install several versions of Qt 5 (e.g. for android, mingw, Visual Studio etc…)
Happy coding !