Difference between qt4-mac and official Nokia-package

Ryan Schmidt ryandesign at macports.org
Wed Sep 8 10:18:45 PDT 2010


On Sep 8, 2010, at 11:59, Jan Lübke wrote:

> this is my first post on this list. Let me fist say thank you for making macports. I use it for years and it makes my Mac so much more useable!

Welcome! We're glad you like it.


> I am trying to build harbour (www.harbour-project) on Mac OS X 10.6.4 with qt-support and run into some difficulties. Maybe someone on this list can help me or give me a hint.
> 
> It works flawlessly if I download and install the official package of qt 4.6.3 for cocoa.
> 
> I assume that qt4-mac is basically the same. Only the paths are different. Is that assumption correct?

I hope so, but do not know.


> Of course I can not expect you to know harbour. It has a very sophisticated build tool that works on many different platforms. It does not auto-detect the presence of qt4. But managed to tweak it and now it tries to build with qt-support.
> 
> My problem (besides the lack of knowledge about qt, make and macports ;-) ) is, that some files do not get found during build. Especially "QtCore/qglobal.h". In macports, there is a file in "/opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/4/Headers/qglobal.h". So I edited the source of harbour to use that file. But here comes the next problem. Even "qglobal.h" contains a link to "QtCore/qconfig.h", a file, that does not exist. However, there is a file called  "/opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/4/Headers/qconfig.h"

QtCore is built as a Mac OS X framework. Mac OS X's compiler knows that when you include "QtCore/qconfig.h" it will look for a framework called QtCore.framework, in its Headers directory, for the qconfig.h file. So all that should need to happen is that you tell your build process where the framework is located. I believe you do that using the compiler argument "-F/opt/local/libexec/qt4-mac/lib". You may also need to use the argument "-framework QtCore", I'm not sure.

The maintainer of qt4-mac recently stated he wants to remove the framework build. If he does, then these steps won't be necessary, and you'd instead add the path to the headers and libraries in -I and -L arguments, respectively.



More information about the macports-users mailing list