+ Reply
Results 1 to 3 of 3

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Help, CGColor issue!

is a discussion within the

3rd Party Apps Requests

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
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,
...
  1. #1
    Banned
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    5
    Thanked 122 Times in 11 Posts

    Unhappy Help, CGColor issue!
    This is my code

    @implementation App
    -(void)applicationDidFinishLaunchingid)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

  2. #2
    Developer NetMage's Avatar
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    1,296
    Thanks
    72
    Thanked 210 Times in 168 Posts

    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.

  3. The Following User Says Thank You to NetMage For This Useful Post:

    forsyt (12-14-2007)

  4. #3
    Banned
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    5
    Thanked 122 Times in 11 Posts

    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