Ich hab da ein seltsamens Problem dass ich mir nicht erklären kann, und deswegen auch keine Lösung finden kann!
Evtl. könnt ihr mir ja ein paar Tipps geben:
Für eines unserer Programme verwende ich die QtSolution QtMmlWidget-2.4. Ich hatte diese Solution mit der Version 2.3 verwendet, ohne Probleme. Auf meinem Rechner (Windows7,VS2008,Qt4.6.2) klappte der Wechsel auf 2.4 auch ohne Probleme, aber auf unserem MinGW-Compiler-Rechner (WindowsXP,MinGW3.81,Qt4.5.2) bekomme ich unser Programm einfach nicht mehr kompiliert.
Die Solution selbst wurde mit der Option "-library" konfiguriert und kompiliert, also als dynamische Bibliothek.
In der PRO-Datei unseres Programmes binde ich die Solution dann so ein:
Code: Alles auswählen
# Qt-Solution QtMmlWidget
include($$[QT_INSTALL_PREFIX]/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.pri)Beim Kompilieren tritt dann folgender Fehler auf:
Code: Alles auswählen
g++ -c -include tmp\obj\release\precompiledheader.h -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_QTMMLWIDGET_IMPORT -DQT_QTCOPYDIALOG_IMPORT -DQT_DLL -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\4.5.2_mingw\include\QtCore" -I"c:\Qt\4.5.2_mingw\include\QtNetwork" -I"c:\Qt\4.5.2_mingw\include\QtGui" -I"c:\Qt\4.5.2_mingw\include\QtXml" -I"c:\Qt\4.5.2_mingw\include\QtSql" -I"c:\Qt\4.5.2_mingw\include\QtWebKit" -I"c:\Qt\4.5.2_mingw\include" -I"src" -I"src\version" -I"src\feemeter" -I"src\fileinfo" -I"src\headerviewex" -I"src\plugins" -I"c:\Qt\4.5.2_mingw\solutions\qtmmlwidget-2.4-opensource\src" -I"c:\Qt\4.5.2_mingw\solutions\qtcopydialog-2.2-opensource\src" -I"c:\Qt\4.5.2_mingw\include\ActiveQt" -I"tmp\moc" -I"tmp\ui" -I"c:\Qt\4.5.2_mingw\mkspecs\win32-g++" -o tmp\obj\release\ratiographwnd.o src\ratiographwnd.cpp
g++ -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_QTMMLWIDGET_IMPORT -DQT_QTCOPYDIALOG_IMPORT -DQT_DLL -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp -o c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:47:30: QtGui/QApplication: No such file or directory
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:48:26: QtCore/QString: No such file or directory
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:49:23: QtCore/QMap: No such file or directory
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:50:32: QtGui/QDesktopWidget: No such file or directory
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:51:26: QtGui/QPainter: No such file or directory
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:52:29: QtGui/QPaintEvent: No such file or directory
In file included from c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:54:
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:50:24: QtGui/QFrame: No such file or directory
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:51:23: QtXml/QtXml: No such file or directory
In file included from c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/QtMmlWidget.cpp:54:
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:72: error: expected class-name before '{' token
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:77: error: expected `)' before '*' token
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:80: error: `QString' does not name a type
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:81: error: expected `,' or `...' before '&' token
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:81: error: ISO C++ forbids declaration of `QString' with no type
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:85: error: expected `,' or `...' before '&' token
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:86: error: ISO C++ forbids declaration of `QString' with no type
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:88: error: `QSize' does not name a type
c:/Qt/4.5.2_mingw/solutions/qtmmlwidget-2.4-opensource/src/qtmmlwidget.h:96: error: `QPaintEvent' has not been declaredProblem ist hier dass er die Datei QtMmlWidget.cpp kompilieren will, was wg. fehlender Include-Verzeichnisse usw. nicht klappt. Die Frage aber ist WARUM will der diese Datei kompilieren? In der dynamischen Variante werden ja nur die Header-Dateien benötigt!? Ich hab mir auch alle Makefiles durchgesehen, ich kann NIRGENDS einen Verweis auf "QtMmlWidget.cpp" entdecken. WIE kommt MinGW jetzt darauf diese cpp kompilieren zu wollen?
Versuchsweise habe ich auch die aktuelle Qt-Version 4.6.2 verwendet, funktioniert aber ebensowenig. Seltsamerweise funktioniert aber die Solution QtCopyDialog, die ebenfalls verwendet wird. Auch funktionieren die Examples zum QtMmlWidget...
Hat jemand einen Tipp für mich wie ich dieses Problem lösen könnte oder überhaupt auf den Grund des Problems kommen könnte?
Gruß,
Christian