(Damn! I sent this to the qt-interest mailinglist by accident. Now I
feel stupid. New try.)

> I have a problem compiling the bbkeys qt conf tool (I'm using qt2.2):
> 
> (mmj@staudinger) build/bbkeys-0.3.5/bbkeysconf-1.2> make
> /usr/bin/moc gui.hh -o gui.moc
> /usr/bin/g++ -g -I/usr/include -I/usr/lib/qt2/include -I/usr/X11R6/include -c -o 
>gui.o gui.cc
> In file included from gui.cc:597:
> gui.moc:45: new declaration `static void FrontEnd::staticMetaObject()'
> gui.hh:23: ambiguates old declaration `static class QMetaObject * 
>FrontEnd::staticMetaObject()'
> gui.moc: In function `void __static_initialization_and_destruction_0(int, int)':
> gui.moc:29: no matching function for call to `QMetaObjectInit::QMetaObjectInit 
>(QMetaObject * (*)())'
> /usr/lib/qt2/include/qmetaobject.h:259: candidates are: 
>QMetaObjectInit::QMetaObjectInit(void (*)())
> /usr/lib/qt2/include/qmetaobject.h:261:                 
>QMetaObjectInit::QMetaObjectInit(const QMetaObjectInit &)
> make: *** [gui.o] Error 1
> zsh: 24263 exit 2     make
> 
> Cheers,
> Mads Martin.

Me and my flatmate had the same problem. Even though we run virtually
the same setup he could get it working by making some minor changes to
the Makefile and not me. So if you haven't tried that already, maybe you
should have a look in the Makefile and see if there's some path that is
wrong. I reached for some more radical means. I looked to tmake for a
solution.

First I made a bbkeysconf.pro file that looked like this:

TEMPLATE = app
CONFIG   = qt warn_on release x11
HEADERS  = gui.hh myapplication.hh
SOURCES  = gui.cc main.cc myapplication.cc
TARGET   = bbkeysconf

Then I removed the #include "gui.moc" line at the end of gui.cc.

To finally run:

tmake bbkeysconf.pro > Makefile

and:

make

This was probably overkill, but it worked and I settled with that.

Mattias

Reply via email to