[Qgis-developer] QGIS compiled with Qt 4.1.4 on OS X?

William Kyngesburye woklist at kyngchaos.com
Sun Jul 30 17:28:06 EDT 2006


On Jul 30, 2006, at 12:43 AM, Gary Sherman wrote:

>
> On Jul 29, 2006, at 8:15 PM, Tom Elwertowski wrote:
>
>> Gary Sherman wrote:
>>> Has anybody compiled QGIS using Qt 4.1.4 on OS X? I'm getting a  
>>> bunch of odd include errors and it appears that things are not in  
>>> the usual place:
>>> In file included from /usr/local/Trolltech/Qt-4.1.4/lib/ 
>>> QtCore.framework/Headers/QEvent:1,
>>>                  from qgis.h:33,
>>>                  from qgis.cpp:2:
>>> /usr/local/Trolltech/Qt-4.1.4/lib/QtCore.framework/Headers/ 
>>> qcoreevent.h:27:31: error: QtCore/qnamespace.h: No such file or  
>>> directory
>>> -gary
>>
>> QGIS compiles ok for me. My copy of qnamespace.h is in the same  
>> place.
>>
>> Tom

...

> Interestingly enough I only have one copy of it in my QTDIR:
> ophir:/usr/local/Trolltech root# find ./ -name qnamespace.h
> .//Qt-4.1.4/lib/QtCore.framework/Versions/4.0/Headers/qnamespace.h

I thought this looked familiar.  In rebuilding Qt today, therefore  
looking at my Qt notes, I found my note about this - Some (many?  
all?) of the headers in Qt assume a normal unix bin/lib/include  
structure, so the includes in the frameworks are not found.  So,  
#include <QtCore/qnamespace.h> looks in QTDIR/include/QtCore/, which  
doesn't exist.

Normally the framework mechanism takes care of this so <QtCore/ 
qnamespace.h> would get translated into QTDIR/lib/QtCore.framework/ 
Headers/qnamespace.h, but that doesn't seem to be happening with  
QGIS.  It needs the -F [dir] option to work, similar to the -I option  
for normal includes.  dir is the folder containing the frameworks,  
QTDIR/lib.  So maybe QGIS isn't adding this on a Mac build (I haven't  
got to Qgis yet today).

My quick-n-dirty solution was to add symlinks in QTDIR/include to the  
framework Headers folders:

include/QtCore -> ../lib/QtCore.framework/Headers
...


-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin





More information about the Qgis-developer mailing list