help!!iOS 4.0,makefile error.

Discussion in 'iPhone/iPad Programming' started by 19821125, Aug 10, 2010.

  1. macrumors newbie

    Joined:
    Aug 10, 2010
    #1
    help!!iOS 4.0,makefile error.

    Undefined symbols:
    ".objc_class_name_NSBundle", referenced from:
    literal-pointer@__OBJC@__cls_refs@NSBundle in ccv39OXl.o
    ".objc_class_name_NSAutoreleasePool", referenced from:
    literal-pointer@__OBJC@__cls_refs@NSAutoreleasePool in ccv39OXl.o
    ".objc_class_name_NSFileManager", referenced from:
    literal-pointer@__OBJC@__cls_refs@NSFileManager in ccv39OXl.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [MobileLoader.dylib] Error 1
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I don't see a Makefile. Or even an Makefile error. I see an error in linking. What is your Base SDK set to?
     
  3. thread starter macrumors newbie

    Joined:
    Aug 10, 2010
    #3
    makefile


    PLAT = Simulator
    Compiler = gcc-4.2
    VERSION = 4.0
    CC = /Developer/Platforms/iPhone$(PLAT).platform/Developer/usr/bin/$(Compiler)
    Sysroot = /Developer/Platforms/iPhone$(PLAT).platform/Developer/SDKs/iPhone$(PLAT)$(VERSION).sdk

    CFLAGS = -isysroot $(Sysroot)
    CFLAGS += -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks \
    -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 \
    -fvisibility=hidden -gdwarf-2

    LDFLAGS = -dynamiclib \
    -F"$(Sysroot)/System/Library/Frameworks" \
    -F"$(Sysroot)/System/Library/PrivateFrameworks" \
    -framework CoreFoundation \
    -framework CoreGraphics \
    -framework Foundation

    Target = MobileLoader.dylib

    srcs = MobileLoader.mm

    all: $(Target)

    $(Target): $(srcs)
    $(CC) -o $(Target) $(CFLAGS) $(LDFLAGS) $(srcs)


    clean:
    rm -f $(Target) inst

    .PHONY: all
     
  4. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    What, exactly, are you doing? Why do you even have a Makefile? What is MobileLoader.dylib

    To me this all looks like jailbrake stuff as when I do my development in XCode I never need to write Makefiles...
     

Share This Page