unter Windows tausende undefined references...
Verfasst: 24. Juni 2006 19:15
Habe unter Linux ein Qt-Programm geschrieben, was wir nun zur Belegabgabe auch unter Windows compilieren wollen. Wir nutzen hierfür auch qmake, um den moc alles automatisch machen zu lassen, aber trotzdem scheint das nicht zu funktionieren, da wir (bei ich glaube jeder Klasse die von QObject abgeleitet ist und signale und slots verwendet) tausende von undefined references kriegen...
Hier mal ein kleiner ausschnitt der Fehlermeldungen:
unsere .pro Datei sieht folgendermaßen aus:
Liegt es denn wirklich an dem moc? Hab mir auch schon die Seiten bei Trolltech durchgelesen und werde im notfall die makefiles per hand erstellen müssen...
Hier mal ein kleiner ausschnitt der Fehlermeldungen:
Code: Alles auswählen
./release\moc_registersettingsdialog.o(.rdata$_ZTV22RegisterSettingsDialog[v
table for RegisterSettingsDialog]+0x110):moc_registersettingsdialog.cpp:
undefined r
eference to `non-virtual thunk to QWidget::releaseDC(HDC__*) const'
./release\moc_registersettingsdialog.o(.rdata$_ZTV22RegisterSettingsDialog[v
table for RegisterSettingsDialog]+0x114):moc_registersettingsdialog.cpp:
undefined r
eference to `non-virtual thunk to
QWidget::metric(QPaintDevice::PaintDeviceMetric) const'
./release\moc_registersettingsdialog.o(.text$_ZN22RegisterSettingsDialogD1Ev
[RegisterSettingsDialog::~RegisterSettingsDialog()]+0x1b):moc_registersettin
gsdialog
.cpp: undefined reference to `_imp___ZN7QDialogD2Ev'
./release\moc_registersettingsdialog.o(.text$_ZN22RegisterSettingsDialogD0Ev
[RegisterSettingsDialog::~RegisterSettingsDialog()]+0x1c):moc_registersettin
gsdialog
[...]
d:\Programme\Qt\4.1.3\lib/libqtmain.a(qtmain_win.o)(.text$_ZN7QVectorIPcEC1E
i[QVector<char*>::QVector(int)]+0x52):qtmain_win.cpp: undefined reference to
`_imp__
_Z7qMemSetPvij'
d:\Programme\Qt\4.1.3\lib/libqtmain.a(qtmain_win.o)(.text$_ZN7QVectorIPcE7re
allocEii[QVector<char*>::realloc(int, int)]+0x3d):qtmain_win.cpp: undefined
referenc
e to `_imp___Z8qReallocPvj'
d:\Programme\Qt\4.1.3\lib/libqtmain.a(qtmain_win.o)(.text$_ZN7QVectorIPcE7re
allocEii[QVector<char*>::realloc(int, int)]+0xaf):qtmain_win.cpp: undefined
referenc
e to `_imp___ZN11QVectorData6mallocEiiiPS_'
d:\Programme\Qt\4.1.3\lib/libqtmain.a(qtmain_win.o)(.text$_ZN7QVectorIPcE7re
allocEii[QVector<char*>::realloc(int, int)]+0xd7):qtmain_win.cpp: undefined
referenc
e to `_imp___Z7qMemSetPvij'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\..\bin\ludoqt.exe] Error 1
mingw32-make[1]: Leaving directory
`H:/EBOOKS/Informatik/_STUDIUM/AI/Semester
4/V-Sys/Beleg/svn/Ludo-Qt/LudoQt/src'
mingw32-make: *** [release] Error 2Code: Alles auswählen
######################################################################
# Automatically generated by qmake (2.00a) Sa 24. Jun 18:46:11 2006
######################################################################
QT += network
LIBS += -lQtXml \
-lglut \
-lQtOpenGL
TEMPLATE = app
TARGET +=
DEPENDPATH += . ludogl messages utils
INCLUDEPATH += .D:/Programme/Qt/4.1.3/include/QtXml/ \
D:/Programme/Qt/4.1.3/include/QtGui/ \
D:/Programme/Qt/4.1.3/include/Qt/ \
D:/Programme/Qt/4.1.3/include/QtNetwork/ \
D:/Programme/Qt/4.1.3/include/QtCore/ \
D:/Programme/Qt/4.1.3/include/QtOpenGL/
CONFIG += debug \
warn_on \
qt \
opengl
# Input
HEADERS += gamesettingsdialog.h \
highscoresdialog.h \
LudoGame.h \
messagehandler.h \
registersettingsdialog.h \
tableitem.h \
tablemodel.h \
window.h \
ludogl/board.h \
ludogl/field.h \
ludogl/figure.h \
ludogl/ludogl.h \
ludogl/player.h \
ludogl/surfaceGeometry.h \
ludogl/trackball.h \
messages/abstractgameactionmessage.h \
messages/abstractmessage.h \
messages/AddMeToGameRequest.h \
messages/AddMeToGameResponse.h \
messages/AddMeToLoadedGameRequest.h \
messages/AddMeToLoadedGameResponse.h \
messages/CurrentGameStartedNotification.h \
messages/DiceRolledRequest.h \
messages/DiceRolledResponse.h \
messages/DownloadGamelistRequest.h \
messages/DownloadGamelistResponse.h \
messages/DownloadGamelistResponseGame.h \
messages/DownloadHighscoreListRequest.h \
messages/DownloadHighscoreListResponse.h \
messages/DownloadHighscoreListResponseEntry.h \
messages/DownloadStoredGamesRequest.h \
messages/DownloadStoredGamesResponse.h \
messages/DownloadStoredGamesResponseGame.h \
messages/DoYouWantToSaveRequest.h \
messages/DoYouWantToSaveResponse.h \
messages/EndGameByClientsFaultNotification.h \
messages/EndGameByServerSaveNotification.h \
messages/FigureMovedRequest.h \
messages/FigureMovedResponse.h \
messages/GameActionMessage.h \
messages/GameActionRequest.h \
messages/GiveUpTurnToNextPlayerNotification.h \
messages/IamTheWinnerNotification.h \
messages/LoadGameRequest.h \
messages/LoadGameResponse.h \
messages/NewPlayerAddedNotification.h \
messages/PlayerRemovedNowItsMyTurnNotification.h \
messages/ReadyToGoNotification.h \
messages/RegisterRequest.h \
messages/RegisterResponse.h \
messages/RemoveMeFromGameRequest.h \
messages/SaveGameRequest.h \
messages/SaveGameResponse.h \
messages/SendChatMessageRequest.h \
messages/SleepingNotification.h \
messages/StartCurrentGameRequest.h \
messages/StartNewGameRequest.h \
messages/StartNewGameResponse.h \
messages/YourTurnNotification.h \
utils/xmlreader.h \
safe_read.c \
ludogl/SurfaceGeometry.h
FORMS += highscores.ui ludo.ui register.ui startscreen.ui
SOURCES += gamesettingsdialog.cpp \
highscoresdialog.cpp \
LudoGame.cpp \
ludoqt.cpp \
main.cpp \
messagehandler.cpp \
registersettingsdialog.cpp \
safe_read.c \
tableitem.cpp \
tablemodel.cpp \
window.cpp \
ludogl/board.cpp \
ludogl/field.cpp \
ludogl/figure.cpp \
ludogl/ludogl.cpp \
ludogl/player.cpp \
ludogl/surfaceGeometry.cpp \
ludogl/trackball.cpp \
messages/AddMeToGameRequest.cpp \
messages/AddMeToGameResponse.cpp \
messages/AddMeToLoadedGameRequest.cpp \
messages/AddMeToLoadedGameResponse.cpp \
messages/CurrentGameStartedNotification.cpp \
messages/DiceRolledRequest.cpp \
messages/DiceRolledResponse.cpp \
messages/DownloadGamelistRequest.cpp \
messages/DownloadGamelistResponse.cpp \
messages/DownloadGamelistResponseGame.cpp \
messages/DownloadHighscoreListRequest.cpp \
messages/DownloadHighscoreListResponse.cpp \
messages/DownloadHighscoreListResponseEntry.cpp \
messages/DownloadStoredGamesRequest.cpp \
messages/DownloadStoredGamesResponse.cpp \
messages/DownloadStoredGamesResponseGame.cpp \
messages/DoYouWantToSaveRequest.cpp \
messages/DoYouWantToSaveResponse.cpp \
messages/EndGameByClientsFaultNotification.cpp \
messages/EndGameByServerSaveNotification.cpp \
messages/FigureMovedRequest.cpp \
messages/FigureMovedResponse.cpp \
messages/GameActionMessage.cpp \
messages/GameActionRequest.cpp \
messages/GiveUpTurnToNextPlayerNotification.cpp \
messages/IamTheWinnerNotification.cpp \
messages/LoadGameRequest.cpp \
messages/LoadGameResponse.cpp \
messages/NewPlayerAddedNotification.cpp \
messages/PlayerRemovedNowItsMyTurnNotification.cpp \
messages/ReadyToGoNotification.cpp \
messages/RegisterRequest.cpp \
messages/RegisterResponse.cpp \
messages/RemoveMeFromGameRequest.cpp \
messages/SaveGameRequest.cpp \
messages/SaveGameResponse.cpp \
messages/SendChatMessageRequest.cpp \
messages/SleepingNotification.cpp \
messages/StartCurrentGameRequest.cpp \
messages/StartNewGameRequest.cpp \
messages/StartNewGameResponse.cpp \
messages/YourTurnNotification.cpp \
utils/xmlreader.cpp