tags:

views:

22

answers:

1

Apple's Image I/O programming guide says:

Image I/O resides in the Application Services framework in Mac OS X, and in the Image I/O framework in iOS. After adding the framework to your application, import the header file by including this statement:

#import <ImageIO/ImageIO.h>

I must be "adding the framework" wrong because when I add the #import line to my code and compile I get an error "ImageIO/ImageIO.h: No such file or directory". Can someone tell me what I'm doing wrong?

I did the following in Xcode to get the error.

  1. New Project (OS X Cocoa Application)
  2. In the "Groups & Files" tree select MyProjectName/Frameworks/Other Frameworks...
  3. Right click and select Add > Existing Frameworks
  4. Under "Mac OSX 10.6 SDK" in the dialog that appears, choose "ApplicationServices.framework"
  5. In MyProjectName.m (or any other file) add #import <ImageIO/ImageIO.h>

I'm using Xcode 3.2.3 on OS X 10.6.4 and have 10.6 SDK (10M2262).

I've also tried adding the framework using Project > Add to Project.. and choosing the framework from the SDK and from /System/Library/Frameworks and get the error in all cases.

A: 

You've added the framework correctly. What's causing your problem is that you shouldn't import ImageIO's header specifically; you should import the ApplicationServices header.

You may want to file a bug against the documentation.

Peter Hosey
Thanks! I've reported the typo using the "It's good but..." link at the bottom of Apple's docuemtation page.
Sven