Configure keeps using g++ and not mingw32-g++-dw2
I can't get configure.exe to use mingw32-g++-dw2 which I just installed with the TDM-GCC package. It keeps using g++ despite changes I made in qmake.conf.
I correctly set the compiler to use in qmake.conf, configure even says it uses the win32-g++ qmake spec, but apparently it doesn't?
I get the following error message when running configure:
Quote:
WARNING: Using static linking will disable the use of plugins.
Make sure you compile ALL needed modules into the library.
Creating qmake...
g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
nerators/mac -Igenerators/symbian -IE:\SDK\Qt\4.7.4/include -IE:\SDK\Qt\4.7.4/in
clude/QtCore -IE:\SDK\Qt\4.7.4/include -IE:\SDK\Qt\4.7.4/include/QtCore -IE:\SDK
\Qt\4.7.4/src/corelib/global -IE:\SDK\Qt\4.7.4/src/corelib/xml -IE:\SDK\Qt\4.7.4
/mkspecs/win32-g++ -IE:\SDK\Qt\4.7.4/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNIC
ODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRE
SS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT
-DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROO
T -DQMAKE_OPENSOURCE_EDITION project.cpp
process_begin: CreateProcess(NULL, g++ -c -oproject.o -O -I. -Igenerators -Igene
rators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -IE:\SDK\Qt
\4.7.4/include -IE:\SDK\Qt\4.7.4/include/QtCore -IE:\SDK\Qt\4.7.4/include -IE:\S
DK\Qt\4.7.4/include/QtCore -IE:\SDK\Qt\4.7.4/src/corelib/global -IE:\SDK\Qt\4.7.
4/src/corelib/xml -IE:\SDK\Qt\4.7.4/mkspecs/win32-g++ -IE:\SDK\Qt\4.7.4/tools/sh
ared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -D
QT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QM
AKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_
BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOURCE_EDITION project.cpp, ...
) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [project.o] Error 2
del project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o option.o win
makefile.o projectgenerator.o property.o meta.o makefiledeps.o metamakefile.o xm
loutput.o pbuilder_pbx.o borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj
.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.
o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o qbitarray
.o qbuffer.o qbytearray.o qcryptographichash.o qvsnprintf.o qbytearraymatcher.o
qconfig.o qdatetime.o qdir.o qdiriterator.o qfile.o qtemporaryfile.o qfileinfo.o
qabstractfileengine.o qfsfileengine.o qfsfileengine_iterator.o qfsfileengine_wi
n.o qfsfileengine_iterator_win.o qglobal.o qhash.o qiodevice.o qlibraryinfo.o ql
ist.o qlinkedlist.o qlocale.o qmalloc.o qmap.o qregexp.o qtextcodec.o qutfcodec.
o qstring.o qstringlist.o qsystemlibrary.o qtextstream.o quuid.o qvector.o qurl.
o qsettings.o qsettings_win.o qvariant.o qmetatype.o qxmlstream.o qxmlutils.o qn
umeric.o
Could Not Find E:\SDK\Qt\4.7.4\qmake\project.o
g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
nerators/mac -Igenerators/symbian -IE:\SDK\Qt\4.7.4/include -IE:\SDK\Qt\4.7.4/in
clude/QtCore -IE:\SDK\Qt\4.7.4/include -IE:\SDK\Qt\4.7.4/include/QtCore -IE:\SDK
\Qt\4.7.4/src/corelib/global -IE:\SDK\Qt\4.7.4/src/corelib/xml -IE:\SDK\Qt\4.7.4
/mkspecs/win32-g++ -IE:\SDK\Qt\4.7.4/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNIC
ODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRE
SS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT
-DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROO
T -DQMAKE_OPENSOURCE_EDITION project.cpp
process_begin: CreateProcess(NULL, g++ -c -oproject.o -O -I. -Igenerators -Igene
rators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -IE:\SDK\Qt
\4.7.4/include -IE:\SDK\Qt\4.7.4/include/QtCore -IE:\SDK\Qt\4.7.4/include -IE:\S
DK\Qt\4.7.4/include/QtCore -IE:\SDK\Qt\4.7.4/src/corelib/global -IE:\SDK\Qt\4.7.
4/src/corelib/xml -IE:\SDK\Qt\4.7.4/mkspecs/win32-g++ -IE:\SDK\Qt\4.7.4/tools/sh
ared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -D
QT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QM
AKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_
BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOURCE_EDITION project.cpp, ...
) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [project.o] Error 2
Building qmake failed, return code 2
Re: Configure keeps using g++ and not mingw32-g++-dw2
I am not using mingw though, but I had the same problem when I was compiling this week. I add the path of my compiler to the environment variables and it solve my problem. I am using Ubuntu so I have to add to my PATH.
Try to check your environment variables if it is also properly pointing to the compilers path.
Re: Configure keeps using g++ and not mingw32-g++-dw2
Hi, the path is correct. It's just that it keeps calling g++ and not g++-dw2 or mingw32-g++-dw2.
I renamed g++-dw2.exe to g++.exe and now it works, but it is of course a sloppy fix.
Re: Configure keeps using g++ and not mingw32-g++-dw2
I don't think configure uses qmake.conf. I don't know if configure.exe works the same the unix incarnation does, but if so then it should be enough to set the CC environment variable to the compiler you want prior to calling configure. Then qmake will be built using your compiler and THEN it will pick up qmake.conf.