Help, CGColor issue!
This is my code
@implementation App
-(void)applicationDidFinishLaunching id)unused;
{
[UIHardware _setStatusBarHeight:0.0f];
[self setStatusBarMode:2 orientation:0 duration:0.0f fenceID:0];
CGRect frame = [UIHardware fullScreenApplicationContentRect];
frame.origin.y = 0;
float bgColor[] = { 1, 1, 9, 1 };
[window setBackgroundColor: CGColorCreate(CGColorSpaceCreateDeviceRGB(), bgColor)];
[window orderFront: self];
[window makeKey: self];
}
How come im getting an error when i compile it
heres the error:
$ make
/usr/local/bin/arm-apple-darwin-gcc -lobjc -framework CoreFoundation -framework
Foundation -framework UIKit -framework LayerKit -o /App.app/App /main.o /App.o
/usr/local/bin/arm-apple-darwin-ld: Undefined symbols:
_CGColorCreate
_CGColorSpaceCreateDeviceRGB
collect2: ld returned 1 exit status
make: *** [/App.app/App] Error 1
can someone help me? dont know what to do. i been trying to learn this objective c for a week now and i keep ending up to this same issue.
thanks
Developer
First, the values are from 0.0 to 1.0, so your B is out of range.
For the link error, try adding a -framework CoreGraphics to the options line with the other frameworks.
The Following User Says Thank You to NetMage For This Useful Post:
thanks for the quick reply. Are you talking about adding an #import or is it with the makefile where i add the -framework CoreGraphics with the other framworks?
tried both, it worked when i added the CoreGraphics foundation in the makefile. again thank you for solving my issue
Last edited by forsyt; 12-14-2007 at 05:23 PM .
Reason: Automerged Doublepost
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules