[gelöst] Qt Creator - Compiler Problem

Verschiedenes zu Qt
Antworten
Mineralwater
Beiträge: 29
Registriert: 6. Mai 2009 16:44
Kontaktdaten:

[gelöst] Qt Creator - Compiler Problem

Beitrag von Mineralwater »

Hallo Leute!

Ich hab ein großes Problem undzwar habe ich alle Schritte dieser Anleitung befolgt um MySQL unter Windows nutzen zu können.

http://qtforum.de/forum/viewtopic.php?t=5343
[MinGW installieren und Qt mit MySQL statisch kompilieren]

Statt der alten Version habe ich die neuere Version 4.5.1 gewählt.
Bis zum Schluss hat auch alles super geklappt, allerdings hab ich dann feststellen müssen das der Qt Creator ja gar nicht mit dabei ist.
Also hab ich Qt Creator 1.1.1 Binary for Windows manuell heruntergeladen und in das Verzeichnis "C:\develop\Qt\4.5.1-static\" installiert.

Das Problem an der Sache ist, dass QtCreator zu Anfangs die Meldung brachte das keine VersionsNummer angegeben ist.
Was genau muss ich denn unter Options->QtVersions angeben?

Ich hab es bisher mit folgendem probiert:

Version-Name: 4.5.1
Path: C:\develop\Qt\4.5.1-static
MinGW-Directory: C:\develop\MinGW

Wenn ich auf Rebuild klicke (keine Ahnung ob das nötig ist)
dann bekomme ich einen ShowLog der wie folgt aussieht:

Code: Alles auswählen

Building debugging helper library in C:/develop/Qt/4.5.1-static/qtc-debugging-helper/

Running C:/develop/MinGW/bin/mingw32-make.exe clean...
C:/develop/MinGW/bin/mingw32-make -f Makefile.Release clean
mingw32-make[1]: Entering directory `C:/develop/Qt/4.5.1-static/qtc-debugging-helper'
del tmp\obj\release_static\gdbmacros.o
del release\libgdbmacros.a
mingw32-make[1]: Leaving directory `C:/develop/Qt/4.5.1-static/qtc-debugging-helper'
C:/develop/MinGW/bin/mingw32-make -f Makefile.Debug clean
mingw32-make[1]: Entering directory `C:/develop/Qt/4.5.1-static/qtc-debugging-helper'
del tmp\obj\debug_static\gdbmacros.o
C:\develop\Qt\4.5.1-static\qtc-debugging-helper\tmp\obj\debug_static\gdbmacros.o konnte nicht gefunden werden
del debug\libgdbmacros.a
C:\develop\Qt\4.5.1-static\qtc-debugging-helper\debug\libgdbmacros.a konnte nicht gefunden werden
mingw32-make[1]: Leaving directory `C:/develop/Qt/4.5.1-static/qtc-debugging-helper'
del libgdbmacros.a
C:\develop\Qt\4.5.1-static\qtc-debugging-helper\libgdbmacros.a konnte nicht gefunden werden

Runinng C:/develop/Qt/4.5.1-static/bin/qmake.exe ...

Running C:/develop/MinGW/bin/mingw32-make.exe ...
C:/develop/MinGW/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/develop/Qt/4.5.1-static/qtc-debugging-helper'
g++ -c -O2 -frtti -fno-exceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\include\QtCore" -I"..\include\QtGui" -I"..\include" -I"..\include\ActiveQt" -I"tmp\moc\release_static" -I"." -I"..\mkspecs\win32-g++" -o tmp\obj\release_static\gdbmacros.o gdbmacros.cpp
g++ -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -shared -Wl,--out-implib,release\libgdbmacros.a -o release\gdbmacros.dll tmp/obj/release_static/gdbmacros.o  -L"c:\develop\Qt\4.5.1-static\lib" -L"c:\develop\Qt\4.5.1-static\lib" -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text+0x1e): undefined reference to `_imp___ZNK10QByteArray8endsWithEPKc'
tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text+0x45): undefined reference to `_imp___ZNK10QByteArray8endsWithEPKc'

---- cut ---- // weitere hunderte Meldung auf die "gdbmacros.o:gdbmacros.cpp" bezogen

tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text+0x10d67): undefined reference to `_imp___ZN11QTextStreamlsEPKc'
tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text+0x10d7e): undefined reference to `_imp___ZN7QString4freeEPNS_4DataE'
tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text$_ZN5QListI7QStringE4freeEPN9QListData4DataE[QList<QString>::free(QListData::Data*)]+0x40): undefined reference to `_imp___ZN7QString4freeEPNS_4DataE'
tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text$_ZN5QListI7QStringE4freeEPN9QListData4DataE[QList<QString>::free(QListData::Data*)]+0x63): undefined reference to `_imp___Z5qFreePv'
tmp/obj/release_static/gdbmacros.o:gdbmacros.cpp:(.text$_ZN5QListIN14QObjectPrivate10ConnectionEE4freeEPN9QListData4DataE[QList<QObjectPrivate::Connection>::free(QListData::Data*)]+0x44): undefined reference to `_imp___Z5qFreePv'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\gdbmacros.dll] Error 1
mingw32-make[1]: Leaving directory `C:/develop/Qt/4.5.1-static/qtc-debugging-helper'
mingw32-make: *** [release] Error 2

Wenn ich das ganze einfach mal ignoriere und dennoch ein normales MainWindow mit leeren Inhalt erstellen möchte, kommt beim Build-Vorgang folgendes unter Compile Output:

Code: Alles auswählen

Running build steps for project Test...
Starting: C:/develop/Qt/4.5.1-static/bin/qmake.exe E:/Projekte/Test/Test.pro -spec win32-g++ -r CONFIG+=debug 
Exited with code 0.
Starting: C:/Develop/MinGW/bin/mingw32-make.exe -w 
mingw32-make: Entering directory `E:/Projekte/Test'
C:/Develop/MinGW/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `E:/Projekte/Test'
c:\develop\Qt\4.5.1-static\bin\uic.exe mainwindow.ui -o ui_mainwindow.h
g++ -c -g -frtti -fno-exceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\develop\Qt\4.5.1-static\include\QtCore" -I"c:\develop\Qt\4.5.1-static\include\QtNetwork" -I"c:\develop\Qt\4.5.1-static\include\QtGui" -I"c:\develop\Qt\4.5.1-static\include\QtSql" -I"c:\develop\Qt\4.5.1-static\include\QtWebKit" -I"c:\develop\Qt\4.5.1-static\include" -I"c:\develop\Qt\4.5.1-static\include\ActiveQt" -I"debug" -I"." -I"c:\develop\Qt\4.5.1-static\mkspecs\win32-g++" -o debug\main.o main.cpp
g++ -c -g -frtti -fno-exceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\develop\Qt\4.5.1-static\include\QtCore" -I"c:\develop\Qt\4.5.1-static\include\QtNetwork" -I"c:\develop\Qt\4.5.1-static\include\QtGui" -I"c:\develop\Qt\4.5.1-static\include\QtSql" -I"c:\develop\Qt\4.5.1-static\include\QtWebKit" -I"c:\develop\Qt\4.5.1-static\include" -I"c:\develop\Qt\4.5.1-static\include\ActiveQt" -I"debug" -I"." -I"c:\develop\Qt\4.5.1-static\mkspecs\win32-g++" -o debug\mainwindow.o mainwindow.cpp
C:/develop/Qt/4.5.1-static/bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\develop\Qt\4.5.1-static\include\QtCore" -I"c:\develop\Qt\4.5.1-static\include\QtNetwork" -I"c:\develop\Qt\4.5.1-static\include\QtGui" -I"c:\develop\Qt\4.5.1-static\include\QtSql" -I"c:\develop\Qt\4.5.1-static\include\QtWebKit" -I"c:\develop\Qt\4.5.1-static\include" -I"c:\develop\Qt\4.5.1-static\include\ActiveQt" -I"debug" -I"." -I"c:\develop\Qt\4.5.1-static\mkspecs\win32-g++" -D__GNUC__ -DWIN32 mainwindow.h -o debug\moc_mainwindow.cpp
g++ -c -g -frtti -fno-exceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\develop\Qt\4.5.1-static\include\QtCore" -I"c:\develop\Qt\4.5.1-static\include\QtNetwork" -I"c:\develop\Qt\4.5.1-static\include\QtGui" -I"c:\develop\Qt\4.5.1-static\include\QtSql" -I"c:\develop\Qt\4.5.1-static\include\QtWebKit" -I"c:\develop\Qt\4.5.1-static\include" -I"c:\develop\Qt\4.5.1-static\include\ActiveQt" -I"debug" -I"." -I"c:\develop\Qt\4.5.1-static\mkspecs\win32-g++" -o debug\moc_mainwindow.o debug\moc_mainwindow.cpp
g++ -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o debug\Test.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -L"c:\develop\Qt\4.5.1-static\lib" -lmingw32 -lqtmaind -lQtWebKitd -lQtSqld -lshlwapi -lversion -lQtGuid -lQtNetworkd -lmysql -lodbc32 -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCored -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
mingw32-make[1]: Leaving directory `E:/Projekte/Test'
mingw32-make: Leaving directory `E:/Projekte/Test'
C:\Develop\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lqtmaind
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\Test.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project Test
When executing build step 'Make'
Ich hoffe ihr könnt mir helfen, bin schwer verzweifelt :(


Gruß
Mineralwater
Beiträge: 29
Registriert: 6. Mai 2009 16:44
Kontaktdaten:

Beitrag von Mineralwater »

Erst nach nochmaliger Reschersche ist mir aufgefallen das auch beim Projekt selbst die Angabe nötig ist, dass es sich um eine statische Anwendung handelt.

Die .pro File musste um folgendes ergänzt werden:
CONFIG += static

Warum der "Rebuild" allerdings unter Einstellungen->Optionen->QtVersionen nicht geklappt hat, ist mir dennoch ein Rätsel.
Naja wie auch immer, auch wenns dort noch immer hakt, dass allgemeine Entwickeln der Anwendungen klappt nun :)


Gruß Mineralwater
Antworten