QT2.x project--tarball doesn't compile

Ralf Nolden rnolden at kdevelop.de
Wed Feb 23 15:22:29 GMT 2000


"M.H." wrote:
> Hi again,
> thanks for your response, but this doesn't seem to help here.
> I now created a new ("empty") Qt2.x SDI project, made a distribution and tried
> to compile it -- same problem.
> It works if I run it from within Kdevelop; when I try to compile the tarball, the moc
> files are not created/compiled/linked.
> I made some experiments (let's say my project is under /home/mh/tartest;
> the gunzipped/untared tarball is under /opt/sourcepackages/tartest-0.1)
> I copied makefile.in from /home/mh/tartest/tartest to
> /opt/sourcepackages/tartest-0.1/tartest. Now it works without a problem.
> (at least I hope that's the only thing I did)
> Is this a bug or am I doing something really stupid?
Hi Michael,

seems you´re doing something stupid because it runs here- I created an
empty project like you (qt-2.x sdi), compiled, made a tarball, untarred
the tarball, ran ./configure --with-qt-dir=/usr/lib/qt-2.1 (this is
where I have Qt-2.1), and make. Runs fine from here. The only thing that
may have happened is that in your Makefile.am within your project
dir(where the sources are) you have the line
project_METASOURCES=USE_AUTOMOC

For Qt-2 and KDE2 this has to be = AUTO. That is the only thing I can
imagine what could have caused the error. For understanding: the new
project types have the perlscript am_edit in their main dir instead of
the automoc script which is used with old projects. The script is only
present in your development package, in the tarball not. That is
because: make -f Makefile.dist creates the Makefile.in´s from the
Makefile.am´s. The Makefile.dist calls the am_edit (resp. automoc)
script, which adds the moc-calls to your Makefile.in´s from what it
scans by the Q_Object macro, so all headers with that macro have a
moc-call in the Makefile.in´s and that is why your copying worked. So
the only other cause is that in your Makefile.dist you have a missing
call of perl am_edit in the dist: section, because your all: section
contains it, otherwise you couldn´t build your project from within
KDevelop.

Any Questions ?

It may be that some things have been fixed until the last beta, I can´t
remember errors like that fixed, but can be.

Hope that helped,

Ralf

-- 
**********************************
Ralf Nolden

Ardennenstr. 41 
52355 Düren

Tel. 02421/502758

The KDevelop Project
http://www.kdevelop.org

Email: rnolden at kdevelop.de
**********************************




More information about the KDevelop mailing list