SoundCloud Error (clang failed with exit code 1) - objective-c

I'm trying to impement SoundCLoudApi from here, but there is clang error without any description:
Ld /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/scapitest.app/scapitest normal i386
cd /Users/dimakorolcenko/Documents/SoundCloudIssues/scapitest
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator -F/Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator -filelist /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Intermediates/scapitest.build/Debug-iphonesimulator/scapitest.build/Objects-normal/i386/scapitest.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/JSONKit/JSONKit /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/libJSONKit.a /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/libOAuth2Client.a /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/libOHAttributedLabel.a /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/libSoundCloudAPI.a /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/libSoundCloudUI.a /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/OAuth2Client/OAuth2Client /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/SoundCloudAPI/SoundCloudAPI /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/SoundCloudUI/SoundCloudUI -framework CoreText -framework CoreGraphics -framework Security -framework CoreLocation -framework AddressBook -framework AddressBookUI -framework QuartzCore -framework UIKit -framework Foundation -o /Users/dimakorolcenko/Library/Developer/Xcode/DerivedData/scapitest-dbwrumaigeiklgcvrmtokdvcppfu/Build/Products/Debug-iphonesimulator/scapitest.app/scapitest
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
I have completed all steps from instruction, but it doesn't work. I have no ideas, how to solve it. Please, help me to find solution. May be it is more common error, and it is not SoundCloud issue...

Your deployment target is probably wrong.
Select your project in the project navigator on the left side. Go to the build settings tab. Make sure your deployment target is iOS, not OS X.

Related

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

Linker command failed with exit code 1 after moving project from one computer to another

i am new to Xcode and obective-c and I have a problem with a project I have taken over from another developer on another machine. I cannot contact this programmer anymore (fired).
Ld /Users/*****/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator/Dino.app/Dino normal i386
cd /Users/******/Dropbox/Xcode/ABCiTY/Dino
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator -F/Users/******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator -filelist /Users/******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Intermediates/Dino.build/Debug-iphonesimulator/Dino.build/Objects-normal/i386/Dino.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -lABCityCrossMarketing -framework AdSupport -framework CoreMotion -framework SystemConfiguration -framework CoreData -framework QuartzCore -framework CoreImage -framework AVFoundation -framework StoreKit -framework UIKit -framework Foundation -framework CoreGraphics -lGoogleAnalytics -lGoogleConversionTracking -o /Users/*******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator/Dino.app/Dino
ld: library not found for -lABCityCrossMarketing
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone help me with this?
You are missing the library file libABCityCrossMarketing.a.
A google for "ABCityCrossMarketing" returns nothing for me. Looks bad. If you still have access to his machine, then that looks like the only way to recover this file (it's possible this library was written by him and never published).
The message is clear here, I think:
library not found for -lABCityCrossMarketing
This happens when you move folders and the controls or basically any file is misplaced by Xcode and it doesn't know where to find it. You'd have to add it to your project again or change the path to it wherever it was listed.

Clang error:failed with exitcode 1(use -v to see invocation)

I am trying to develop an application in xcode using objective c with SUP backend.When I builded my project I got an error like
Ld /Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Products/Debug-iphonesimulator/New_App.app/New_App normal i386
cd /Users/chairman/Desktop/New_App/New_App
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Users/chairman/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/chairman/Desktop/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/chairman/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Users/chairman/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Products/Debug-iphonesimulator -L/Users/chairman/Desktop/New_App/New_App/../../MAC_IOS/importing_Libraries/Libraries/Debug-iphoneos -L/Users/chairman/Desktop/New_App/New_App/../../MAC_IOS/importing_Libraries/Libraries/Debug-iphonesimulator -L/Users/chairman/Desktop/New_App/New_App/../../MAC_IOS/importing_Libraries/Libraries/Release-iphoneos -L/Users/chairman/Desktop/New_App/New_App/../../MAC_IOS/importing_Libraries/Libraries/Release-iphonesimulator -L/Users/chairman/Desktop/New_App/New_App/../../New_App_Data/importing_Libraries/Libraries/Debug-iphonesimulator -F/Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Products/Debug-iphonesimulator -filelist /Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Intermediates/New_App.build/Debug-iphonesimulator/New_App.build/Objects-normal/i386/New_App.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -lstdc++.6 -lz.1.2.5 -licucore.A -framework Security -framework QuartzCore -framework CoreFoundation -framework AddressBook -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Products/Debug-iphonesimulator/New_App.app/New_App
ld: duplicate symbol _OBJC_IVAR_$_dev_BhaskarG_com_igate_shipping_v1KeyGenerator._remoteId in /Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Intermediates/New_App.build/Debug-iphonesimulator/New_App.build/Objects-normal/i386/dev_BhaskarG_com_igate_shipping_v1KeyGenerator.o and /Users/chairman/Library/Developer/Xcode/DerivedData/New_App-brpimxjxwxsuimcjcfjjrmpnextw/Build/Intermediates/New_App.build/Debug-iphonesimulator/New_App.build/Objects-normal/i386/dev_BhaskarG_com_igate_shipping_v1KeyGenerator copy.o for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone please help me in solving this?
Duplicate symbol means you have the same symbol (class, variable, etc) defined in two places in your project (or its included libraries).
Look at the error messages...it looks like you've included the same file in your project twice:
dev_BhaskarG_com_igate_shipping_v1KeyGenerator
dev_BhaskarG_com_igate_shipping_v1KeyGenerator copy

Error "file not found: -fobjc-arc" on compiling IOS App in XCode

after adding the OCMock framework i got that strange error... :(
ld: file not found: -fobjc-arc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like if the compiler flag tries to be loaded by XCode?
Any idea?
Best regards, hijolan
I was getting the exact same error on Xcode 4.3.2. Here's my navigator log; I'm adding it for Google juice.
Ld /Users/makdad/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/JournalTests.octest/JournalTests normal i386
cd /Users/makdad/Documents/MT/mt-mobile/iOS/Journal
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator -F/Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Intermediates/Journal.build/Debug-iphonesimulator/JournalTests.build/Objects-normal/i386/JournalTests.LinkFileList -mmacosx-version-min=10.6 -bundle_loader /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/Journal.app/Journal -Xlinker -objc_abi_version -Xlinker 2 -ObjC -force_load -fobjc-arc -ftest-coverage -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -lOCMock -framework Twitter -framework MapKit -framework MobileCoreServices -framework SystemConfiguration -lxml2 -licucore -framework CoreData -framework CoreGraphics -framework CFNetwork -framework QuartzCore -framework SenTestingKit -framework UIKit -framework Foundation -o /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/JournalTests.octest/JournalTests
The OCMock instructions explicitly ask you to add linker flags -- -ObjC and -force_load.
-force_load is expecting a value -- see the answer to this question that explains that -all_load is what to use if you don't want to specify a library name.
As someone who just spent 25 minutes on this, I should check again with the OCMock tutorial -- I don't think it was very clear in this instruction.
This blog post has a much better image that shows exactly how your settings should look.

Xcode error: ld: library not found for -lgomp

I'm compiling a project in Objective-C depending on libraries in C.
The compilation fails with the following error:
Ld /Users/user/Library/Developer/Xcode/DerivedData/MyProject-enqkiqdfplxedfeowxlkwfgadtyz/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal i386
cd /Users/user/Documents/XCodeWorkspace/MyProject/Subproject
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/MyProject-enqkiqdfplxedfeowxlkwfgadtyz/Build/Products/Debug-iphonesimulator -L/Users/user/Documents/XCodeWorkspace/MyProject/Subproject/../../../../../Library/Developer/Xcode/DerivedData/MyProject-enqkiqdfplxedfeowxlkwfgadtyz/Build/Products/Debug-iphoneos -F/Users/user/Library/Developer/Xcode/DerivedData/MyProject-enqkiqdfplxedfeowxlkwfgadtyz/Build/Products/Debug-iphonesimulator -filelist /Users/user/Library/Developer/Xcode/DerivedData/MyProject-enqkiqdfplxedfeowxlkwfgadtyz/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fopenmp -licucore -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -lamsip -lcares -lexosip2 -lgsm -lmediastreamer2 -lspeex -lsrtp -lsqlite3.0 -framework MessageUI -framework AudioToolbox -framework AVFoundation -lz -framework AddressBook -framework AddressBookUI -framework Foundation -framework UIKit -framework CoreGraphics -framework SystemConfiguration -framework CoreTelephony -lTestFlight -o /Users/user/Library/Developer/Xcode/DerivedData/MyProject-enqkiqdfplxedfeowxlkwfgadtyz/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp
ld: library not found for -lgomp
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
The problem I see is that this library isn't even specified in the link command! Why is this needed at all?
Yours,
Emmanuel
Someone had enabled OpenMP using "other flags" which causes the -lgomp library to be included. :-(