error: framework not found ApplicationServices

Posts: 1
Joined: 2008.11
Post: #1
I am trying to learn this so bear with me.
I am trying to create an iphone app and so far i have implemented the code to connect the window, view and object together. Next I am trying to implement a custom view where I override the "(void)drawRect:(CGRect)rect". If I have just the method name and just have

CGContextRef context = UIGraphicsGetCurrentContext();

inside the method it runs fine. However as soon as I implement the code below

NSLog(@"Path is empty");

and do "Build and go" I get the error:

Line Location Tool:0: collect2: ld returned 1 exit status
Line Location Tool:0: symbol(s) not found
Line Location Tool:0: -[drawpoly drawRect:] in drawpoly.o
Line Location Tool:0: "_CGContextIsPathEmpty", referenced from:

I thought the framework was missing for Application framework so I did "Add"->"Existing Frameworks"->"CoreGraphics.Framework" and do "Build and go" (used "Default" option) it gives me error:

Line Location Tool:0: Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 failed with exit code 1
Line Location Tool:0: cannot link directly with /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/CoreGraphics. Link against the umbrella framework 'ApplicationServices.framework' instead.

When I add the ApplicationServices.framework I get:

Line Location Tool:0: Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 failed with exit code 1
Line Location Tool:0: framework not found ApplicationServices

Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
You've added the Mac OS X frameworks, not the iPhone frameworks.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Symbol(s) not found using oalTouch example code monteboyd 2 4,530 Sep 26, 2010 10:49 PM
Last Post: monteboyd
  Found my slowdown. FYI. Madrayken 17 9,806 Jul 31, 2009 04:06 AM
Last Post: Madrayken
  Texture2D class Found Gillissie 1 4,059 Mar 16, 2009 03:49 PM
Last Post: jeonghyunhan