Automatic moc generation
Sigmund Gudvangen
sigmund at gudvangen.net
Fri Aug 22 16:34:33 BST 2003
Le Vendredi 22 Août 2003 16:42, Mickael Faivre-Macon écrivit :
> Hi Sigmund and Alexandro,
>
> Thanks for the replies !
>
> Sigmund:
> > If you generated your project with KDevelope then it should automatically
> > generate *.moc files, and compile them, when you build the project.
>
> Yes, I generated it with KDevelop using the wizard and using "Generate a
> QWidject child class" but I switched from Mandrake to Red Hat making a
> source backup only (stupid of me), then I have created a new project and
> loaded the classes in the project. It worked from the Qt .ui files (the
> moc are generated) but KDevelop does not generate the moc files
> automatically for the other classes like before.
>
> If the wizard can tell KDevelop to generate a QWidget child class, how
> can we do it manually ? Do we have to modify the makefile by hand ? I
> don't know what to modify.
>
> Alexandro:
> > (in reality, kdevelop generates a
> > Makefile.am, which automake uses to create a Makefile).
>
> Do you know what to change in this .am file in order that the makefile
> call the moc compiler automatically so I don't have to call it my hand
> every time I want to compile my project ? I just want this process to be
> automatic to save time.
>
One (fairly) quick way around the problem is to just generate a fresh project
and then copy across all relevant *.h and *.cpp files from your old project
and add them to the new one with Project | Add existing File(s). Probably not
what you are after, but it doesn't take long.
Sigmund.
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list