Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

d.devendran

macrumors newbie
Original poster
Aug 3, 2009
5
0
Hi experts, I'm newbie for iphone dev, no i'm learning native way to dev, when i'm using the following content in my Makefile as below


DEVICE = 192.168.1.15
APPL = MyApp

DOTH = MyApp.h
OBJS = main.o MyApp.o

SDK = /Developer/Platforms/iPhoneOS.platform/Developer
ARCH = armv6
SYSROOT= $(SDK)/SDKs/iPhoneOS2.2.sdk

CC = $(SDK)/usr/bin/arm-apple-darwin9-gcc-4.0.1 \
-arch $(ARCH) -isysroot $(SYSROOT)
CFLAGS = -std=c99 -Werror -I$(SDK)/usr/include/gcc/darwin/4.0

LD = $(CC)
LDFLAGS =\
-framework UIKit\
-framework CoreFoundation\
-framework Foundation\
-framework CoreGraphics\
-framework LayerKit\
-lobjc\
-bind_at_load

$(APPL): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
cp $(APPL) $(APPL).app
@chmod 755 $(APPL).app/$(APPL)
@touch $(APPL).app

%.o: %.m $(DOTH)
$(CC) $(CFLAGS) -c $<


install: $(APPL)
@ssh root@$(DEVICE) /bin/rm -f /Applications/$(APPL).app/$(APPL)
scp -r $(APPL).app root@$(DEVICE):/Applications
ssh root@$(DEVICE) /usr/bin/ldid -S /Applications/$(APPL).app/$(APPL)

i'm getting error as :
ld: framework not found LayerKit
collect2: ld returned 1 exit status

but when i remove '-framework LayerKit\ ' in the LDFLAGS, its working ok, can anyone help me

thanks
 
I believe LayerKit was the name of Core Animation originally, but then they changed it. The framework you want is QuartzCore.
 
i try with below code;

the below declare in .h file
-------------------------
UIPushButton *markButton;
CGColorSpaceRef colorSpace;

the below is in .m file
--------------------
markButton = [[UIPushButton alloc] initWithFrame:CGRectMake(60.0,29.0,106.0,30.0)];
[markButton setAutosizesToFit:NO];
[markButton setShowPressFeedback:YES];
[markButton setTitle:mad:"new game"];
[markButton setTitleColor:CGColorCreate(colorSpace,white) forState:0];


when compile, i'm getting error as below,

cc1obj: warnings being treated as errors
apview.m: In function '-[APView initWithFrame:eek:wnedBy:]':
apview.m:59: warning: receiver 'UIColor' is a forward class and corresponding @interface may not exist
apview.m:59: warning: no '-initWithCGColor:' method found
apview.m:59: warning: (Messages without a matching method signature
apview.m:59: warning: will be assumed to return 'id' and accept
apview.m:59: warning: '...' as arguments.)
apview.m:59: warning: 'UIPushButton' may not respond to '-setTitleColor:'
make: *** [apview.o] Error 1
 
I don't believe UIPushButton is a public class. Why are you using that rather than UIButton?
 
The cause of that compile error is that the #import for UIColor is missing. I don't see any use of a precompiled header in the make file. There probably should be one. At any rate that source file is missing an #import.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.