bazscott
bazscott

Reputation: 27

Link error in iOS app

I am getting the following error framework not found -fobjc-arc while compiling an iOS app that previously worked fine. I have no idea what framework it cannot find. Does anyone know where I could track this down? thanks.

Ld /Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos/ConverserApp.app/ConverserApp normal armv7
cd /Users/baz/Dropbox/Code/_clients/Converser/ConverserApp
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos -L/Users/baz/Dropbox/Code/_clients/Converser/ConverserApp/../mobile-api-docs.2/converser-canary -L/Users/baz/Dropbox/Code/_clients/Converser/ConverserApp/Libs/Converser -F/Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos -F/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries -filelist /Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Intermediates/ConverserApp.build/Debug-iphoneos/ConverserApp.build/Objects-normal/armv7/ConverserApp.LinkFileList -dead_strip -ObjC -framework -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework SystemConfiguration -framework MessageUI -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -lz -framework Reveal -lVGConversationKit_universal -o /Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos/ConverserApp.app/ConverserApp

ld: framework not found -fobjc-arc
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 1

Views: 679

Answers (2)

beautifulBeast
beautifulBeast

Reputation: 51

Go to Projects--->Targets---->Build Settings--->Other Linker Flags. Click on the value side and make sure there are no extraneous [ -framework ] values. If so, delete them. Notice the pattern of line [-framework], next line has a framework in quotes, next line has [-framework]. Etc. It should never end with a -framework, nor have extras. These linker flags happen after compile and make sure that the binary is linked with necessary frameworks.

Other Linker Flags closeup

Upvotes: 2

Carl Norum
Carl Norum

Reputation: 224834

It's not a real framework - your command line contains this bit:

-framework -fobjc-arc

Which is wrong - the -framework flag should be followed by a framework name, not by another flag. You need to find out where that extra -framework is coming from. There are several correct -framework flags in that command too - notice that they all have a framework name included: -framework MessageUI -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics

Upvotes: 0

Related Questions