PDA

View Full Version : help explaining qmake generated make file



high_flyer
3rd August 2006, 19:43
Hi,

Since I am on a central administrated PC, and I want to work with Qt4 and KDevelop > 3.0 I had to install both Qt4 and KDevelop on not default locations.
But when I try to compile a Qt4 test project I get an error that says that <Qt path>/src/moc does not exist.
So wondering where this path is in the make file I found out that qmake generates this:

$(MOC):
( cd $(QTDIR)/src/moc && $(MAKE) )
I thought this has to do with my custom install so I went to check the makefile on my working qt3 installation with a project that compiles.
And there too, qmake generates the same above code in the makefile.
But neither may Qt3 nor Qt4 installation has $(QTDIR)/src/moc, so what I don't understand is, why does this work for the Qt3 make file?

Thanks.

EDIT:
never mind I figured it out.
For a reason i still need to figure out qmake generates a makfile with a MOC variable set to /bin/moc and not $(QTDIR)/bin/moc, so it trys to make moc out of source, whic the path to does not exist since this is the installation location not the src location of Qt4.

kandalf
8th August 2006, 03:03
Which is the path to the qmake executable that is generating the mentioned Makefile?
How are you running KDevelop? I mean, what is the environment from which you start KDevelop?

high_flyer
8th August 2006, 09:54
I figured it all out - KDevelop uses PATH to call qmake, so all though QTDIR is given to it correctly it will run the qmake that it finds first in PATH.