Build QtCreator with Mingw - undefined references
-
Hello,
I was hoping that someone would be kind enough to give me guidance as searching the forums and google did not seem to produce any real results...
Downloaded QtCreator for windows and was doing great until I tried to make my own plugin, then I got the dreaded:
Expected build key "Windows msvc release full-config" got "Windows mingw release full-config"
A search told me that the cause is QtCreator was compiled with Visual Studio, and I would need to build QtCreator with Mingw. So I downloaded the source and followed the directions, the Mingw32-Make command spit out : undefined references
Below is the command and the last few lines of the output.
@
C:\Qt\2010.05\qt\bin\qmake.exe C:\QtCreator\Source\qtcreator.pro
C:\Qt\2010.05\mingw\bin\mingw32-make.exe...serveral hundred lines of output later...
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQMLJS_BUILD_DIR -DQT_CREATOR -DIDE_LIBRARY_BASENAME="lib" -DWITH_TESTS -DQT_N
O_CAST_TO_ASCII -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQMLJS_
BUILD_DIR -DQT_DLL -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPO
RT -I"c:\Qt\2010.05\qt\include\QtCore" -I"c:\Qt\2010.05\qt\include\QtGui" -I"c:
Qt\2010.05\qt\include\QtTest" -I"c:\Qt\2010.05\qt\include" -I"........\Source
\src\libs" -I"c:\QtCreator\Source\tools" -I"........\Source\src\libs\qmljs\pa
rser" -I"........\Source\src\libs" -I"c:\Qt\2010.05\qt\include\ActiveQt" -I"d
ebug" -I"........\Source\src\libs\qmljs" -I"." -I"c:\Qt\2010.05\qt\mkspecs\de
fault" -o debug\moc_qmljsicontextpane.o debug\moc_qmljsicontextpane.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -shared -mthreads -Wl -Wl,--out-implib,c:\QtCreator\Build\lib\qtcreator\libQm
lJSd.a -o ......\lib\qtcreator\QmlJSd.dll object_script.QmlJSd.Debug -L"c:\Qt
\2010.05\qt\lib" -LC:/QtCreator/Build/lib/qtcreator -lUtilsd -lQtTestd4 -lQtGuid
4 -lQtCored4
Creating library file: c:\QtCreator\Build\lib\qtcreator\libQmlJSd.a
./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src
/libs/qmljs/qmljsrewriter.cpp:131: undefined reference to_imp___ZN5Utils9Chang eSet7replaceEiiRK7QString' ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src /libs/qmljs/qmljsrewriter.cpp:305: undefined reference to
_imp___ZN5Utils9Chang
eSet7replaceEiiRK7QString'
./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src
/libs/qmljs/qmljsrewriter.cpp:346: undefined reference to_imp___ZN5Utils9Chang eSet7replaceEiiRK7QString' ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src /libs/qmljs/qmljsrewriter.cpp:409: undefined reference to
_imp___ZN5Utils9Chang
eSet7replaceEiiRK7QString'
./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src
/libs/qmljs/qmljsrewriter.cpp:561: undefined reference to_imp___ZN5Utils9Chang eSet7replaceEiiRK7QString' ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src /libs/qmljs/qmljsrewriter.cpp:578: more undefined references to
_imp___ZN5Utils
9ChangeSet7replaceEiiRK7QString' follow
collect2: ld returned 1 exit status
mingw32-make[4]: *** [......\lib\qtcreator\QmlJSd.dll] Error 1
mingw32-make[4]: Leaving directoryC:/QtCreator/Build/src/libs/qmljs' mingw32-make[3]: *** [debug] Error 2 mingw32-make[3]: Leaving directory
C:/QtCreator/Build/src/libs/qmljs'
mingw32-make[2]: *** [sub-qmljs-make_default-ordered] Error 2
mingw32-make[2]: Leaving directoryC:/QtCreator/Build/src/libs' mingw32-make[1]: *** [sub-libs-make_default-ordered] Error 2 mingw32-make[1]: Leaving directory
C:/QtCreator/Build/src'
mingw32-make: *** [sub-src-make_default-ordered] Error 2@
I am somewhat new to this, seems like it is having an issue linking, any ideas?
As a side note, it would be awesome if QtCreator was built with Mingw so this process was seemless, or give us an option in the appliction to load all plugins regardless of what they were compiled with...but regardless I am very grateful to have QtCreator :)
-
How am I supposed to understand that last comment? Did you cross-compile Qt Creator for Windows on a Linux box?
The Linux version of Qt Creator we ship is build with gcc, not mingw... that is why I am confused:-)
-
[quote author="Tobias Hunger" date="1298224767"]How am I supposed to understand that last comment? Did you cross-compile Qt Creator for Windows on a Linux box? The Linux version of Qt Creator we ship is build with gcc, not mingw... that is why I am confused:-) [/quote]
Sorry let me clarify...
I have a dual boot machine, Kubuntu Linux and Windows 7.
In Linux downloaded from the repositories.
In windows, I downloaded from the Qt web site.The windows version of Qt Creator was compiled with Visual Studio, but ships with Mingw. So when you attempt to create your own plugin, the plugin will not load with a message of:
Expected build key “Windows msvc release full-config” got “Windows mingw release full-config”
So I tried (on windows) to download the QtCreator source and compile with Mingw, but I am getting the errors mentioned in the original post.
All I was saying is that custom plugins work perfectly in Linux because QtCreator was compiled with the same compiler, Windows however is compiled with VS, and QTCreator uses a different compiler, so plugins will not load.
Is there a way to bypass the plugin signature checking without a compiling QtCreator? (Perhaps a argument or option I missed?)