PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : QtValidLicenseForCore



stefan-tiger
08-09-2005, 09:17
Hallo, habe versucht mit der Qt 4er OpenSource Edition und dem MinGW ein Simples Qt Beispiel zu kompilieren.

main.cpp

#include <qapplication.h> // QApplication
#include <q3mainwindow.h> // QMainWindow
using namespace std;

int main(int argc, char **argv)
{
// Create a QApplication object (required)
QApplication app(argc, argv);

// Create a QMainWindow object
Q3MainWindow *window = new Q3MainWindow();

// Move and resize the QMainWindow object
// left=200, top=200, width=400, height=300
window->setGeometry(200, 200, 400, 300);

// Main window = QMainWindow object
app.setMainWidget(window);

// set Window Title
window->setCaption("My QMainWindow example");

// Show the window
window->show();

// Go to the main loop (required)
return app.exec();
}

qt01.pro

################################################## ####################
# Automatically generated by qmake (2.00a) Do 8. Sep 10:00:19 2005
################################################## ####################

TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
QT += qt3support

# Input
SOURCES += main.cpp


make in der Konsole:


C:\Temp\qt01>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Temp/qt01'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBU
G -DQT_CORE_LIB -DQT_GUI_LIB -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_THREAD_SUPPORT -DQT_NEEDS_Q
MAIN -I"C:/Qt/4.0.1/include/Qt3Support" -I"C:/Qt/4.0.1/include/QtGui" -I"C:/Qt/4.0.1/include/Qt
Core" -I"C:/Qt/4.0.1/include" -I"." -I"C:/Qt/4.0.1/include/ActiveQt" -I"release" -I"." -I"C:/Qt
/4.0.1/mkspecs/win32-g++" -o release\main.o main.cpp
In file included from C:/Qt/4.0.1/include/QtCore/qnamespace.h:1,
from C:/Qt/4.0.1/include/QtCore/../../src/corelib/kernel/qobjectdefs.h:27,
from C:/Qt/4.0.1/include/QtCore/qobjectdefs.h:1,
from C:/Qt/4.0.1/include/QtCore/../../src/corelib/kernel/qobject.h:29,
from C:/Qt/4.0.1/include/QtCore/qobject.h:1,
from C:/Qt/4.0.1/include/QtCore/../../src/corelib/kernel/qcoreapplication.h:27
,
from C:/Qt/4.0.1/include/QtCore/qcoreapplication.h:1,
from C:/Qt/4.0.1/include/QtGui/../../src/gui/kernel/qapplication.h:27,
from C:/Qt/4.0.1/include/QtGui/qapplication.h:1,
from main.cpp:1:
C:/Qt/4.0.1/include/QtCore/../../src/corelib/global/qnamespace.h:29: error: `QtValidLicenseForC
oreModule' does not name a type
...
...
...
In file included from C:/Qt/4.0.1/include/Qt3Support/q3dockwindow.h:1,
from C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3toolbar.h:2
7,
from C:/Qt/4.0.1/include/Qt3Support/q3toolbar.h:1,
from C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3mainwindow.
h:28,
from C:/Qt/4.0.1/include/Qt3Support/q3mainwindow.h:1,
from main.cpp:2:
C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3dockwindow.h:29: error: `QtValidL
icenseForQt3SupportLightModule' does not name a type
In file included from C:/Qt/4.0.1/include/Qt3Support/q3toolbar.h:1,
from C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3mainwindow.
h:28,
from C:/Qt/4.0.1/include/Qt3Support/q3mainwindow.h:1,
from main.cpp:2:
C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3toolbar.h:29: error: `QtValidLice
nseForQt3SupportLightModule' does not name a type
In file included from C:/Qt/4.0.1/include/QtCore/qtextcodec.h:1,
from C:/Qt/4.0.1/include/QtCore/../../src/corelib/io/qtextstream.h:33,
from C:/Qt/4.0.1/include/QtCore/qtextstream.h:1,
from C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3mainwindow.
h:29,
from C:/Qt/4.0.1/include/Qt3Support/q3mainwindow.h:1,
from main.cpp:2:
C:/Qt/4.0.1/include/QtCore/../../src/corelib/codecs/qtextcodec.h:30: error: `QtValidLicenseForC
oreModule' does not name a type
In file included from C:/Qt/4.0.1/include/QtCore/qtextstream.h:1,
from C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3mainwindow.
h:29,
from C:/Qt/4.0.1/include/Qt3Support/q3mainwindow.h:1,
from main.cpp:2:
C:/Qt/4.0.1/include/QtCore/../../src/corelib/io/qtextstream.h:39: error: `QtValidLicenseForCore
Module' does not name a type
In file included from C:/Qt/4.0.1/include/Qt3Support/q3mainwindow.h:1,
from main.cpp:2:
C:/Qt/4.0.1/include/Qt3Support/../../src/qt3support/widgets/q3mainwindow.h:31: error: `QtValidLicenseForQt3SupportLightModule' does not name a type
mingw32-make[1]: *** [release\main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Temp/qt01'
mingw32-make: *** [release] Error 2


Auszug aus q3mainwindow.h (Zeile 31 ist fett)


..
#ifndef Q3MAINWINDOW_H
#define Q3MAINWINDOW_H

#include "QtGui/qwidget.h"
#include "Qt3Support/q3toolbar.h"
#include "QtCore/qtextstream.h"

QT_MODULE(Qt3SupportLight)

#ifndef QT_NO_MAINWINDOW
..


Hat jemand ne Idee wo der Fehler steckt?

stefan-tiger
08-09-2005, 09:46
Ich hab was gefunden, in der qglobal.h:



...
#define QT_LICENSED_MODULE(x) \
enum QtValidLicenseFor##x##Module { Licensed##x = true };

#if (QT_EDITION & QT_MODULE_CORE)
QT_LICENSED_MODULE(Core)
#endif
#if (QT_EDITION & QT_MODULE_GUI)
QT_LICENSED_MODULE(Gui)
#endif
#if (QT_EDITION & QT_MODULE_NETWORK)
QT_LICENSED_MODULE(Network)
#endif
#if (QT_EDITION & QT_MODULE_OPENGL)
QT_LICENSED_MODULE(OpenGL)
#endif
#if (QT_EDITION & QT_MODULE_SQL)
QT_LICENSED_MODULE(Sql)
#endif
#if (QT_EDITION & QT_MODULE_XML)
QT_LICENSED_MODULE(Xml)
#endif
#if (QT_EDITION & QT_MODULE_QT3SUPPORTLIGHT)
QT_LICENSED_MODULE(Qt3SupportLight)
#endif
#if (QT_EDITION & QT_MODULE_QT3SUPPORT)
QT_LICENSED_MODULE(Qt3Support)
#endif

#define QT_MODULE(x) \
typedef QtValidLicenseFor##x##Module Qt##x##Module;
...

Nur weiss ich net wo jetzt bei mir der Fehler liegt. Warum beschwert er sich?