PDA

View Full Version : help!!iOS 4.0,makefile error.




19821125
Aug 10, 2010, 04:43 AM
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



robbieduncan
Aug 10, 2010, 05:04 AM
I don't see a Makefile. Or even an Makefile error. I see an error in linking. What is your Base SDK set to?

19821125
Aug 10, 2010, 05:13 AM
I don't see a Makefile. Or even an Makefile error. I see an error in linking. What is your Base SDK set to?

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

robbieduncan
Aug 10, 2010, 05:18 AM
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...