From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-04-04 10:44:01
On Wednesday 04 April 2007 17:43, Hassan Mehmet wrote:
> Please can anyone help by providing a simple example of how to get the qt3 moc
> command to work from a Jamfile.
> Unfortunately the boost.build examples do not seem to help (I have tried
> various combinations of "cast" and "/qt3//qt" and nothing seems to work).
Did you try any of examples in
and if so, what errors did you get?
> I am currently converting GNUmakefiles to Jamfiles and have 100's of header
> files that need to be moc'd (also 100's of .ui files in the same libraries)
> For example in a library I may have a Qt derived class A
> #include <qdialog.h>
> class A : public QDialog
> ... usual class stuff ...
> and a source file
> #include "A.h"
> ... blah de blah ...
> What I want to do is: moc A.H -o A_moc.cpp
> and then compile A.cpp and A_moc.cpp and put them in a library
> What am I missing from the following
> In user-config.jam
> using qt3 ;
> In Jamfile
> import modules ;
> local qtdir = [ modules.peek : qtdir QTDIR ] ;
> project : requirements <include>$(qtdir)/include ;
> alias my-sources : A.cpp A_moc.cpp ;
> lib LibA : my-sources : : : ;
This says to compile a file called A_moc.cpp, and such file does not
exist, and there's nothing to say how it should be built. Something like:
lib LibA : A.cpp A.h /qt3//qt ;
is what you're after, but really, start by trying the examples.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk