On Sat, Mar 20, 2010 at 05:37:36PM -0700, Marcelo Acuña wrote:

> > > > > This file was generated using the moc from
> > 4.5.1. It
> > > > 
> > > > inside lyx tree:
> > > > find . -name '*moc*' | xargs rm 
> > > 
> > > Before compiler error I found only one *moc*.
> > > I run make clean and is deleted.
> > > I run configure and make produces the error again.
> > 
> > In case you compiled Qt by yourself and you also have the
> > system Qt installed,
> > then, most probably, the wrong moc is being picked up by
> > the configure script.
> > Supposing that you installed Qt in /usr/local/qt, try the
> > following:
> > $ cd /usr/local/qt/bin
> > $ ln -s moc moc-qt4
> > $ ln -s uic uic-qt4
> > and then try to configure again. If I guessed right, it
> > should now work.
> 
>  Thanks Enrico. This solved the problem.
>  I gave a look to output of the configure and I noticed that also it find for
> 
>  rcc-qt4
> 
>  without finding it.
>  It will be necessary to also make a link to that file?

That doesn't hurt but should not be necessary. The configure script looks
in the PATH first for xxx-qt4 and then xxx. This is because you can also
have Qt3 installed and it has to be sure to pick up the Qt4 version.
For this reason, distributions rename the Qt4 xxx compilers as xxx-qt4.
This is done for moc and uic, but not for rcc (as Qt3 doesn't have it).
What happens is that when looking for moc-qt4 and uic-qt4, they are not
found in the bin dir of the specified Qt4 location (which is prepended to
the PATH) but they are found in the system Qt4 bin dir. So, the check for
moc and uic (without '-qt4') is not performed. Instead, rcc-qt4 is not
found neither in the system Qt4 bin dir nor in the specified Qt4 dir, so
configure now looks for rcc and finds it in the right place.

-- 
Enrico

Reply via email to