PDA

View Full Version : Compiling a Qt project in Mac



sunil.thaha
30th October 2007, 10:25
Hi Guys,

This is a Mac-newbie question. I have my Qt project. invoking qmake generates a xcodeproj/ rather than creating a Makefile. So how do I generate a Makefile.
Or

How can I compile the xcodeproj from the terminal ?

jpn
30th October 2007, 10:46
QMAKESPEC is set to "macx-xcode", isn't it? Try switching it to "macx-g++" or passing the spec to qmake:

qmake -spec macx-g++

sunil.thaha
30th October 2007, 10:59
Thanks a lot!!

I failed to find any such thing in Assistant.
Could you please post the link in the assistant if it has any ? :confused:

BTW: I did not find the QMAKESPEC environment variable defined.
So, I believe Qt generates xcode be default

jpn
30th October 2007, 11:32
Sorry, I don't know. I just remember someone else having the same problem. :) Perhaps it's mentioned in INSTALL file?

Brandybuck
30th October 2007, 16:45
It is in Assistant, and you would have eventually found it if you dug a bit further in the qmake docs for Mac OSX topics: http://doc.trolltech.com/4.3/qmake-platform-notes.html

If you build Qt from sources, you get the macx-g++ spec by default, but if you use the binary package from TT, you get macx-xcode by default.

sunil.thaha
31st October 2007, 06:20
Thanks for bringing that to our notice !! :)
And that answers many other questions I have