Trouble compiling nethack w/ qt

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

I'm trying to compile nethack 3.4.3 w/ qt 3.3.4 and am running into
some trouble that I'm hoping someone here could help me out with. It
all has to do with the Qt side. everything else compiles normally.

/bin/moc -o qt_win.moc ../include/qt_win.h
/bin/moc -o qt_kde0.moc ../include/qt_kde0.h
/bin/moc -o qttableview.moc ../include/qttableview.h
g++ -O2 -fomit-frame-pointer -I../include -I. -I/include -c
.../win/Qt/qt_win.cpp
In file included from ../win/Qt/qt_win.cpp:77:
.../include/qt_win.h:511: error: expected class-name before ',' token
.../win/Qt/qt_win.cpp:1820: error: expected class-name before '{' token
..
..
..
In file included from ../win/Qt/qt_win.cpp:5265:
../qttableview.moc: In static member function `static QMetaObject*
QtTableView::staticMetaObject()':
../qttableview.moc:55: error: `QUParameter' does not name a type
../qttableview.moc:58: error: variable `const QUMethod slot_0' has
initializer but incomplete type
../qttableview.moc:58: error: `param_slot_0' undeclared (first use this
function)
../qttableview.moc:59: error: `QUParameter' does not name a type
../qttableview.moc:62: error: variable `const QUMethod slot_1' has
initializer but incomplete type
../qttableview.moc:62: error: `param_slot_1' undeclared (first use this
function)
../qttableview.moc:63: error: variable `const QUMethod slot_2' has
initializer but incomplete type
../qttableview.moc:64: error: `QUParameter' does not name a type
../qttableview.moc:67: error: variable `const QUMethod slot_3' has
initializer but incomplete type
../qttableview.moc:67: error: `param_slot_3' undeclared (first use this
function)
../qttableview.moc:68: error: `QUParameter' does not name a type
../qttableview.moc:71: error: variable `const QUMethod slot_4' has
initializer but incomplete type
../qttableview.moc:71: error: `param_slot_4' undeclared (first use this
function)
../qttableview.moc:72: error: variable `const QUMethod slot_5' has
initializer but incomplete type
../qttableview.moc: In member function `virtual bool
QtTableView::qt_invoke(int, QUObject*)':
../qttableview.moc:104: error: `static_QUType_int' undeclared (first use
this function)
../qttableview.moc:104: error: invalid use of undefined type `struct
QUObject'
/usr/include/qobjectdefs.h:72: error: forward declaration of `struct
QUObject'
../qttableview.moc:105: error: invalid use of undefined type `struct
QUObject'
/usr/include/qobjectdefs.h:72: error: forward declaration of `struct
QUObject'
../qttableview.moc:107: error: invalid use of undefined type `struct
QUObject'
/usr/include/qobjectdefs.h:72: error: forward declaration of `struct
QUObject'
../qttableview.moc:108: error: invalid use of undefined type `struct
QUObject'
/usr/include/qobjectdefs.h:72: error: forward declaration of `struct
QUObject'
make[1]: *** [qt_win.o] Error 1
make[1]: Leaving directory `/scratch/software/nethack-3.4.3/src'
make: *** [nethack] Error 2

This is just an excerpt of what comes out if anyone wants me to email
them the full text just ask. I don't want to take up too much
bandwidth and post the whole output.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

kj6loh@gmail.com wrote:

> I'm trying to compile nethack 3.4.3 w/ qt 3.3.4 and am running into
> some trouble that I'm hoping someone here could help me out with. It
> all has to do with the Qt side. everything else compiles normally.
>
> /bin/moc -o qt_win.moc ../include/qt_win.h
> /bin/moc -o qt_kde0.moc ../include/qt_kde0.h
> /bin/moc -o qttableview.moc ../include/qttableview.h
> g++ -O2 -fomit-frame-pointer -I../include -I. -I/include -c
> ../win/Qt/qt_win.cpp
> In file included from ../win/Qt/qt_win.cpp:77:
> ../include/qt_win.h:511: error: expected class-name before ',' token
> ../win/Qt/qt_win.cpp:1820: error: expected class-name before '{' token

[snip]

> This is just an excerpt of what comes out if anyone wants me to email
> them the full text just ask. I don't want to take up too much
> bandwidth and post the whole output.

As a rule, it's only the first few errors that are interesting, especially
in C++ -- most of the rest are consequences of those first few. GCC is
especially bad to let cascading errors get out of control.

Working with what you've given, include/qt_win.h line 511 reads:

class NetHackQtMenuWindow : public QTableView, public NetHackQtWindow {

and win/Qt/qt_win.cpp line 1820 reads:

class NetHackQtScrollText : public QTableView {

In both cases, QTableView appears before the flagged token.

Now near the top of include/qt_win.h, we see:

#if QT_VERSION >= 300
#include <qttableview.h>
// Should stop using QTableView
#define QTableView QtTableView
#else
#include <qtableview.h>
#endif

It's hard to say which way this is going. It looks like GCC doesn't realize
that QTableView is a type. My first guess is that the wrong part of this
block is being compiled.

Maybe you have more than one version of Qt on your system?

--
--------------===============<[ Ray Chason ]>===============--------------
The War on Terra is not meant to be won.
Delendae sunt RIAA, MPAA et Windoze