On 4/9/2010 4:29 AM, Eike Ziller wrote: > 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. >
Well. CoreGraphics is included in ApplicationServices.h in the same fashion and Qt's own sources include CoreGraphics/CoreGraphics.h a lot. Don't know how it's able to compile. >> 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 :) Thank you very much. It bugs me when I see those wiggle lines in the code. :) -- Stephen Chu <mailto:[email protected]> <http://www.ju-ju.com> _______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
