Qt Creator Compile Error with mingw32-make on Windows
-
Hello,
I have installed qt 5.1.0 and am trying to compile qt creator. I have downloaded the source code for qt creator and run qmake qtcreator.pro which generates a Makefile. I then run mingw32-make which generates the following error (scroll to bottom to see the error codes):
Creating library file: C:\qt-creator-qt-creator\lib\qtcreator\libAggregation.a
release/aggregate.o:aggregate.cpp:(.text+0xc): undefined reference to_imp___ZN 14QReadWriteLockD1Ev' release/aggregate.o:aggregate.cpp:(.text+0x49): undefined reference to
_imp___Z
N9QHashData11free_helperEPFvPNS_4NodeEE'
release/aggregate.o:aggregate.cpp:(.text+0x7d): undefined reference to `_imp___ZRemoved Lines due to 6000 limit
release/aggregate.o:aggregate.cpp:(.text$_ZN6QDebugD1Ev[QDebug::~QDebug()]+0x3c)
: undefined reference to_imp___ZN11QTextStreamD1Ev' release/aggregate.o:aggregate.cpp:(.text$_ZN6QDebugD1Ev[QDebug::~QDebug()]+0x6e) : undefined reference to
_imp___Z17qt_message_output9QtMsgTypeRK18QMessageLogCo
ntextRK7QString'Removed Lines due to 6000 Limit
release/moc_aggregate.o:moc_aggregate.cpp:(.rdata$_ZTVN11Aggregation9AggregateE[
vtable for Aggregation::Aggregate]+0x34): undefined reference toQObject::disco nnectNotify(QMetaMethod const&)' collect2: ld returned 1 exit status mingw32-make[3]: *** [..\..\..\lib\qtcreator\Aggregation.dll] Error 1 mingw32-make[3]: Leaving directory
c:/qt-creator-qt-creator/src/libs/aggregatio
n'
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directoryc:/qt-creator-qt-creator/src/libs/aggregatio n' mingw32-make[1]: *** [sub-libs-aggregation-make_first-ordered] Error 2 mingw32-make[1]: Leaving directory
c:/qt-creator-qt-creator/src'
mingw32-make: *** [sub-src-make_first-ordered] Error 2I'm not sure what the problem is, but if anyone has an idea please let me know.
Thank you. -
Are you using the same compiler that was used to build Qt?
-
MSVC and MinGW compilers are not compatible. You need to go with either one, but not both.
-
Hmm... I'd like to use Visual Studio, but I'm having trouble using custom plugins in qt creator if I use the default installed version. Is it true that I must recompile with MinGW in order to use custom plugins? There was some error about keys being invalid.
-
I don't know that. Qt Creator does not have stable plugin interface, so it's likely that you need a recompile.
-
Concerning the creator plugin plugin question I have started a "similar thread":http://qt-project.org/forums/viewthread/30805/ without success/response yet.
The readme shipped with qt creator states:
[quote]
This section provides step by step instructions for compiling the latest
versions of Qt and Qt Creator on Windows. Alternatively, to avoid having to
compile Qt yourself, you can use one of the versions of Qt shipped with the Qt
SDK (release builds of Qt using MinGW and Visual C++ 2008).
[/quote]The reference to mingw is not specific in view of version. For vc it is. Since vc is not compatible between different versions (at least 2010 downward), you need to recompile when you intend to use msvc2012.
For MinGW I could not find a proper reference which version has been used or if MinGW has been used at all for qt creator in the MinGW 5.1 distro.
-
I'm currently re-compiling Qt on my computer now with Visual Studio, jom, perl, and python. After this, I will try to compile the source for qt creator and see if it works since everything was compiled on my own machine.
Currently, Qt 5.1.0 appears to be compiling correctly (I made sure that perl, python, and jom were in the path list in the environment variables for windows). I'll update when it's done and I try to go at qt create again.
-
Good luck to you, then :)
-
I spoke too soon, when finish compiling the qt creator I get the following error:
@
copy /y "......\lib\qtcreator\ExtensionSystemd.dll" ......\bin
1 file(s) copied.
cd utils\ && ( if not exist Makefile C:\qt-everywhere-opensource-src-5.1.0\qtbase\bin\qmake.exe C:\qt-creator-2.8.0-src\src\libs\utils\utils.pro -o Make
file ) && "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" -f Makefile
Project ERROR: Unknown module(s) in QT: script
NMAKE : fatal error U1077: 'cd' : return code '0x3'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
@
[edit, code tags added, koahnig] -
So I read http://qt-project.org/doc/qt-5.0/qtdoc/modules.html and am thinking that I must not have some required module link since the compiler says Unknown module(s) in the error output. Is there some way I can find out what module it is missing? How would I link the correct module to the compiler?
Sorry for such noob questions!
-
[quote author="CodeGnome" date="1375893957"]
Sorry for such noob questions![/quote]No problem, we are all somewhere noobs.
I would guess if you have compiled Qt with standard settings you should be alright. If you fiddled around with some special settings during configure, that could be an issue.
I have done a compilation of qt creator 2.8 (and 2.7.2) end of last week without problems. It was merely the waiting time. However, I have used Qt 5.1.0 MinGW pre-built. Therefore, I think default settings for Qt libs, you should be fine for creator. However, this could be now related to your vs2012 compiler.
Thinking a bit more, may be it is a nmake issue. You could give jom a shot. At least it should not be a time-consuming side track. -
Here is the "download page for jom":http://qt-project.org/wiki/jom