[Qt-creator] How to include OS X system framework header files?
Eike Ziller
eike.ziller at nokia.com
Fri Apr 9 10:29:47 CEST 2010
Hi,
On Apr 7, 2010, at 9:55 PM, ext Stephen Chu wrote:
> Hi.
>
> I need to access some native OS X functions, specifically ColorSync API.
> I can add #include <ApplicationServices/ApplicationServices.h> to my
> source files and have it compiled properly. But if I use #include
> <ColorSync/CMApplication.h> then it can not find the file.
There is no "ColorSync" framework in the default framework search paths (e.g. /System/Library/Frameworks, /Library/Frameworks).
If you include <ApplicationServices/ApplicationServices.h> you'll get the color sync API as well.
Now, ApplicationServices.h includes "<ColorSync/ColorSync.h>", but this is not available to anyone outside of the ApplicationServices framework. It is a private Framework located inside the ApplicationServices framework itself. That's why you can't include <ColorSync/CMApplication.h> directly either.
> What is the rules of including this kind of system headers?
Usually <Foo/Bar.h> looks for a framework Foo.framework in the framework search paths,
and for a header Foo.framwork/Headers/Bar.h.
Looks like there are additional rules for frameworks in frameworks that we didn't implement in Qt Creator
(ApplicationServices.framework/Frameworks is *not* in the usual framework search path...)
So, you should get the types for the ColorSync manager by including <ApplicationServices/ApplicationServices.h>,
but you don't which is bug http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1102
just created for your convenience :)
Best regards, Eike
> The reason
> I'd like to include individual header files is so Creator can highlight
> the types declared in them properly. Right now it doesn't see anything
> defined in those files.
>
> --
> Stephen Chu
> <mailto:stephen at ju-ju.com>
> <http://www.ju-ju.com>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
--
Eike Ziller
Software Engineer
Nokia, Qt Development Frameworks
Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
More information about the Qt-creator-old
mailing list