   Problems with CGImageGetWidth/-Height methods for iPhone dev
  I am getting some really strange compiler errors in my application for the iPhone. I am using the following code (inspired by the GLSprite sample in the SDK):-(bool)load :(NSString*)fileName{CGImageRef image = [UIImage imageNamed :fileName].CGImage;width = CGImageGetWidth(image);height = CGImageGetHeight(image);if (!image){NSLog(@"ImageLoader: Failed to load image.");return FALSE;}data = (GLubyte*)malloc(width * height * 4);CGContextRef context = CGBitmapContextCreate(data, width, height, 8, width * 4, CGImageGetColorSpace(image), kCGImageAlphaPremultipliedLast);CGContextDrawImage(context, CGRectMake(0.0, 0.0, (CGFloat)width, (CGFloat)height), image);CGContextRelease(context);return TRUE;}I get the following compiler errors:Line Location Tool:0: collect2: ld returned 1 exit statusLine Location Tool:0: symbol(s) not foundLine Location Tool:0: -[ImageLoader load:] in ImageLoader.oLine Location Tool:0: "_CGImageGetWidth", referenced from:Line Location Tool:0: -[ImageLoader load:] in ImageLoader.oLine Location Tool:0: "_CGBitmapContextCreate", referenced from:Line Location Tool:0: "_CGContextDrawImage", referenced from:Line Location Tool:0: "_CGContextRelease", referenced from:Line Location Tool:0: -[ImageLoader load:] in ImageLoader.oLine Location Tool:0: "_CGImageGetColorSpace", referenced from:Line Location Tool:0: -[ImageLoader load:] in ImageLoader.oLine Location Tool:0: "_CGImageGetHeight", referenced from:Line Location Tool:0: -[ImageLoader load:] in ImageLoader.oLine Location Tool:0: -[ImageLoader load:] in ImageLoader.oI have the following imports:#import <QuartzCore/QuartzCore.h>#import <OpenGLES/EAGLDrawable.h>And the following frameworks:QuartzCore.frameworkOpenGLES.frameworkUIKit.frameworkFoundation.frameworkWhat might be causing this problem? The CGImageRef class seems to be working just fine... but not the "global" CGx" methods I am using (which is in accordance to the documentation).   
  Based on the documentation my guess would be that you need to link against the "ApplicationServices" Framework too. Can't try it so I'm not sure.;  There is no such framework. However, it works after I added the CoreGraphics framework from the iPhone SDK.   ;  Seems they put that functionality into a different Framework then. Under normal Mac OS X the documentation states "ApplicationServices" as the Framework.   