[Kde-java] building qtjava without kde

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sat Mar 5 03:38:17 CET 2005


On Friday 04 March 2005 22:26, Shea Martin wrote:
> Richard Dale wrote:
> >On Friday 04 March 2005 18:22, Shea Martin wrote:
> >>Is there a way I can build qtjava without having KDE installed?  I used
> >>Qt regularily, but KDE is not really an option, even though I am in a
> >>Unix environment.
> >
> >I would just use qmake in the kdebindings/qtjava/javalib/qtjava directory
> > - all the C++ sources are there. I've attached a suitable qtjava.pro
> > project the I used recently to build an embedded version of QtJava, so it
> > should work (it doesn't build the QGL* classes though). Just make sure
> > $QTDIR is set up correctly and type 'qmake -makefile' and it should
> > generate a suitable Makefile.
>
> I build the Makefile, but the 'make' fails while compiling JavaSlot.cpp,
> line 22, "can't find JavaSlot.moc".  'find kdebindings -name
> JavaSlot.moc' yeilds nothing.  Am I missing a step here?  I also notice
> that QtUtils.cpp includes QtUtils.moc, which I can't find either.
Ah yes sorry, I forgot about that. You need to change JavaSlot.cpp:

Change:

#include "JavaSlot.moc"

To:

#include "JavaSlot.h"

I left out QtUtils.cpp in the 'qtjava.pro' file because it depends on the 
multi-threaded version of Qt, and the Qt Embedded I was building against was 
single threaded. If you include it, you'll need to make a similar change to 
QtUtils.cpp for the moc include. But it's an 'addon', and not part of the 
core bindings functionality so it can be left out.

-- Richard


More information about the Kde-java mailing list