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:[email protected]>
> <http://www.ju-ju.com>
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> 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




_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to