problem when using Makefile for LayerKit framework

Discussion in 'iPhone/iPad Programming' started by d.devendran, Nov 4, 2009.

  1. macrumors newbie

    #1
    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
     
  2. Moderator emeritus

    kainjow

    #2
    I believe LayerKit was the name of Core Animation originally, but then they changed it. The framework you want is QuartzCore.
     
  3. macrumors newbie

    #3
    thanks bro, ur correct now its using QuartzCore
     
  4. macrumors newbie

    #4
    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
     
  5. macrumors 6502

    #5
    I don't believe UIPushButton is a public class. Why are you using that rather than UIButton?
     
  6. Moderator

    robbieduncan

    Staff Member

    #6
    Given that he's using Makefiles I assume we are talking jailbroken development here...
     
  7. macrumors 68030

    PhoneyDeveloper

    #7
    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.
     

Share This Page