I'm able to build my iOS project right now, but I'm getting two warnings like the following that are really annoying me:
ld: warning: directory not found for option
'-L/Users/brennon/Development/MobileMuse/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib'
(I've broken the compiler command over several lines in a futile attempt at readability):
Ld /Users/brennon/Library/Developer/Xcode/DerivedData/BioAudio-avxobobusfxeffaswkzteodevihm/Build/Intermediates/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv7/BioAudio normal armv7
cd /Users/brennon/Development/MobileMuse/BioAudio
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2
-arch armv7
-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
-L/Users/brennon/Library/Developer/Xcode/DerivedData/BioAudio-avxobobusfxeffaswkzteodevihm/Build/Products/Debug-iphoneos
-L/Users/brennon/Development/MobileMuse/BioAudio
-L/Users/brennon/Development/MobileMuse/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib
-F/Users/brennon/Library/Developer/Xcode/DerivedData/BioAudio-avxobobusfxeffaswkzteodevihm/Build/Products/Debug-iphoneos
-filelist /Users/brennon/Library/Developer/Xcode/DerivedData/BioAudio-avxobobusfxeffaswkzteodevihm/Build/Intermediates/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv7/BioAudio.LinkFileList
-dead_strip -miphoneos-version-min=4.3 -framework Foundation
-framework UIKit -framework CoreGraphics -framework AudioToolbox
-framework Security
-o /Users/brennon/Library/Developer/Xcode/DerivedData/BioAudio-avxobobusfxeffaswkzteodevihm/Build/Intermediates/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv7/BioAudio
It seems to still be trying to link against the 4.2 SDK, which is no more since upgrading my development machine to 10.7 and, hence, Xcode. I've scoured the Project and Target settings, and can't seem to find anything still pointing to 4.2. Any ideas?
EDIT: I tried dtuckernet's answer. Running grep -iRF iPhoneOS4.2.sdk . in the project directory produced the following (sorry about the mess!) output:
./BioAudio.xcodeproj/project.pbxproj: "\"$(SRCROOT)/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib\"",
./BioAudio.xcodeproj/project.pbxproj: "\"$(SRCROOT)/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib\"",
./BioAudio.xcodeproj/project.xcworkspace/xcuserdata/brennon.xcuserdatad/UserInterfaceState.xcuserstate: <string>file://localhost/Users/brennon/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a</string>
./BioAudio.xcodeproj/project.xcworkspace/xcuserdata/brennon.xcuserdatad/UserInterfaceState.xcuserstate: <string>file://localhost/Users/brennon/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a</string>
./BioAudio.xcodeproj/project.xcworkspace/xcuserdata/brennon.xcuserdatad/UserInterfaceState.xcuserstate: <string>Directory not found for option '-L/Users/brennon/Development/MobileMuse/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib'</string>
./build/BioAudio.build/Debug-iphoneos/BioAudio.build/build-state.dat:N/Users/brennon/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a
./build/BioAudio.build/Debug-iphoneos/BioAudio.build/build-state.dat:N/Users/brennon/Development/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a
./build/BioAudio.build/Debug-iphoneos/BioAudio.build/build-state.dat:lSLF07#2#121"Link /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv6/BioAudio3 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/brennon/Development/BioAudio/build/Debug-iphoneos -L/Users/brennon/Development/BioAudio -L/Users/brennon/Development/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib -F/Users/brennon/Development/BioAudio/build/Debug-iphoneos -filelist /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv6/BioAudio.LinkFileList -dead_strip -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework CoreGraphics -framework AudioToolbox -llo -framework Security -o /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphoneos/BioAudio.build/O0#ects-normal/armv6/BioAudio
./build/BioAudio.build/Debug-iphoneos/BioAudio.build/build-state.dat:lSLF07#2#121"Link /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv7/BioAudio3 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/brennon/Development/BioAudio/build/Debug-iphoneos -L/Users/brennon/Development/BioAudio -L/Users/brennon/Development/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib -F/Users/brennon/Development/BioAudio/build/Debug-iphoneos -filelist /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv7/BioAudio.LinkFileList -dead_strip -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework CoreGraphics -framework AudioToolbox -llo -framework Security -o /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphoneos/BioAudio.build/O0#ects-normal/armv7/BioAudio
Binary file ./build/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv6/BioAudio matches
Binary file ./build/BioAudio.build/Debug-iphoneos/BioAudio.build/Objects-normal/armv7/BioAudio matches
./build/BioAudio.build/Debug-iphonesimulator/BioAudio.build/build-state.dat:N/Users/brennon/Development/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a
./build/BioAudio.build/Debug-iphonesimulator/BioAudio.build/build-state.dat:old: warning: in /Users/brennon/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a, file was built for unsupported file format which is not the architecture being linked (i386)
./build/BioAudio.build/Debug-iphonesimulator/BioAudio.build/build-state.dat:lSLF07#2#90"Link /Users/brennon/Development/BioAudio/build/Debug-iphonesimulator/BioAudio.app/BioAudio318119306#318119307#0(372"ld: warning: in /Users/brennon/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a, file was built for unsupported file format which is not the architecture being linked (i3865(22#192"In /Users/brennon/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib/liblo.a, file was built for unsupported file format which is not the architecture being linked (i386)318119307#0#206#0(6#0"318119307#0#0#0#0#0"0(4#46""_lo_address_new_with_proto", referenced from:318119307#225#49#0(6#0"318119307#0#0#0#0#0"0(13#31"-[BioAudio setup] in BioAudio.o318119307#274#38#0(6#0"318119307#0#0#0#0#0"0(13#19"Symbol(s) not found318119307#312#24#0(6#0"318119307#0#0#0#0#0"0(13#35"Collect2: ld returned 1 exit status318119307#336#36#0(6#0"318119307#0#0#0#0#0"0(0#0#0"8640817536#1094" cd /Use /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/brennon/Development/BioAudio/build/Debug-iphonesimulator -L/Users/brennon/Development/BioAudio -L/Users/brennon/Development/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib -F/Users/brennon/Development/BioAudio/build/Debug-iphonesimulator -filelist /Users/brennon/Development/BioAudio/build/BioAudio.build/Debug-iphonesimulator/BioAudio.build/Objects-normal/i386/BioAudio.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework AudioToolbox -llo -framework Security -o /Users/brennon/Developm1#t/BioAudio/build/Debug-iphonesimulator/BioAudio.app/BioAudio
Binary file ./build/Debug-iphoneos/BioAudio.app/BioAudio matches
Changing the entries in pbproject.pbxproj to 4.3 was easy enough, but the same warnings are still thrown on build. Cleaning still doesn't resolve anything. I feel uneasy about just altering the plist keys in the plists under brennon.xcuerdatad. I'm sure the issue is either here or in the build-state files, but shouldn't those be refreshed/rebuilt on a clean and build?
There is still a reference somewhere in your project settings to 4.2 In the past I've used grep to go through all the files in my project and find the reference. See this example:
cd ~/Documents/MyProjectDirectory/
grep -iRF 4.2 .
This should give you all files that contain 4.2, and it should be easy to see where the 4.2 SDK is referenced.
Different configurations Debug / Release may have different settings for a target iOS. Check that configuration that you are compiling match your expectations for iOS that should be set in it.
Related
I recently updated XCode to V 11.1, and since updating, for some reason when I run my app in release mode, I'm thrown the following error:
ld: can't link with a main executable file
'/Users/me/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp'
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
I have absolutely no clue how to resolve this - and I can't run my app in release mode without it (and yes, I'm using a Distribution profile). Help would be much appreciated. I've browsed a few other answers but none seem to solve this issue.
When I navigate to that file path, 'myapp' is simply an icon with a circle and a slash through it (can't be a good sign). This same thing occurs even after I clean the build folder. When I try to rebuild in release mode, the build fails and throws me the above yet again.
See full error:
Ld
/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/Binary/myappTests
normal armv7 (in target 'myappTests' from project 'myapp')
cd /Users/admin/Desktop/myapp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-target armv7-apple-ios8.4 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk
-L/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos
-F/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk/Developer/Library/Frameworks
-F/Users/admin/Desktop/myapp/Pods/FirebaseAnalytics/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleAppMeasurement/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleMaps/Base/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleMaps/Maps/Frameworks -F/Users/admin/Desktop/myapp/Pods/GooglePlaces/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
-filelist /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests.LinkFileList
-Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -dead_strip -bundle_loader /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp
-Xlinker -object_path_lto -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests_lto.o
-fobjc-arc -fobjc-link-runtime -lc++ -licucore -lsqlite3 -lz -framework Accelerate -framework CFNetwork -framework CoreData -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreTelephony -framework CoreText -framework Foundation -framework GLKit -framework ImageIO -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework
SystemConfiguration -framework UIKit -framework XCTest
-lPods-myappTests -Xlinker -dependency_info -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests_dependency_info.dat
-o /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/Binary/myappTests
ld: can't link with a main executable file
'/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp'
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
Finally found the fix in my case. Hopefully this answer is helpful to others.
Product > Scheme > Edit Scheme, and then tap the 'Build' category on
the left hand side.
Under your appTests targets, uncheck "Run".
Problem solved.
Could you say where do you find the slashed icon - it may be a sign Xcode tries to look at a wrong path. You may easily verify it with right-click on the project from Project Navigator, show in Finder.
I recommend Changing deployment target to 8.4.
A solution might be going to Product > Scheme > Edit Scheme, choose Build and uncheck 'Run'
I was getting the ld: can't link with a main executable file error because the Build Settings between my app target and the test app were different, mainly the iOS Deployment Target.
Ensuring that these two were the same allowed the build to succeed.
I'm using libpd in a universal iOS app, working with iOS 7 and Xcode 5.0.2. libpd works as expected (can load and interact with Pd patches), but I'm having trouble using external objects.
Here's the error message I'm seeing:
Ld DerivedData/Build/Products/Debug-iphoneos/BrightHearts.app/BrightHearts normal armv7s
cd /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts
setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
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 armv7s -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos
-F/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos -filelist /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Intermediates/BrightHearts.build/Debug-iphoneos/BrightHearts.build/Objects-normal/armv7s/BrightHearts.LinkFileList
-dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework GLKit -framework OpenGLES -framework SystemConfiguration -framework Security -framework QuartzCore -framework CoreText /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos/libpd-ios.a
-framework AudioToolbox -framework AVFoundation -framework CoreBluetooth -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker
/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Intermediates/BrightHearts.build/Debug-iphoneos/BrightHearts.build/Objects-normal/armv7s/BrightHearts_dependency_info.dat -o
/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos/BrightHearts.app/BrightHearts
Undefined symbols for architecture armv7s:
"_allsickles_setup", referenced from:
-[SENViewController setupPD] in SENViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've seen the suggestion to set the 'Build Active Architecture' flag to YES for the libpd subproject - this doesn't make any difference, I still get the same error.
Is there a solution (obvious or otherwise) for this issue?
looks to me like you aren't actually compiling allsickles.c from the Cyclone external. That file has the method void allsickles_setup(void) which I guess you're trying to call to set up libpd.
If allsickles.c is in your project, maybe it's not actually getting compiled, so you might have to add it to "Compile Sources" under Build Phases.
I am being thrown an error while building my application post adding the libRxAutomation library. I have followed the instructions that are given in their website to integrate the library, moreover it is similar to adding an external library like test flight sdk, flurry etc.
App name * app scheme is replaced with *.. Because of few reasons I am not able to reveal the name. Sorry for the inconvenience caused.
People suggested to check if any file is missing/ are added twice, I have checked in my project and every file is added only once...
Ld /Users/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Products/Debug-iphonesimulator/******-internal\ Beta\ Test.app/******-internal\ Beta\ Test normal i386
cd /Users/dinakarsoma2/Desktop/Patches_test/3.0/******
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
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/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Products/Debug-iphonesimulator -L/Users/dinakarsoma2/Desktop/Patches_test/3.0/****** -L\\\"/Users/dinakarsoma2/Desktop/Patches_test/3.0/******/******/External\\\ Libraries/Flurry\\\" -L\\\"/Users/dinakarsoma2/Desktop/Patches_test/3.0/******/******/External\\\ Libraries/TestFlight\\\ SDK\\\" -L/Users/dinakarsoma2/Desktop/Patches_test/3.0/****** -L/Users/dinakarsoma2/Desktop/Patches_test/3.0/******/******/External\ Libraries/TestFlight\ SDK -F/Users/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Products/Debug-iphonesimulator -F/Users/dinakarsoma2/Desktop/Patches_test/3.0/****** -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/PrivateFrameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Users/dinakarsoma2/Desktop/Patches_test/3.0/******/******/External\ Libraries/DTRichTextEditor.embeddedframework -F/Users/dinakarsoma2/Desktop/Patches_test/3.0/******/******/External\ Libraries/DTRichTextEditor -F/Users/dinakarsoma2/Desktop/Patches_test/3.0/******/../../../../../../Downloads -filelist /Users/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Intermediates/******.build/Debug-iphonesimulator/******-internal\ Beta\ Test.build/Objects-normal/i386/******-internal\ Beta\ Test.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -fobjc-link-runtime -fprofile-arcs -ftest-coverage -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -lz.1.2.5 -framework AssetsLibrary /Users/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Products/Debug-iphonesimulator/libDTRichTextEditor.a -framework CoreText -framework MessageUI -framework StoreKit -framework CoreGraphics -framework GameKit -framework ImageIO -framework AddressBookUI -framework AddressBook -framework EventKit -framework EventKitUI -framework CFNetwork -framework CoreData -lxml2 -framework MobileCoreServices -framework QuartzCore -framework Security -framework UIKit -framework Foundation -lRxAutomationUni_411 -framework SystemConfiguration -lFlurry -lTestFlight -Xlinker -dependency_info -Xlinker /Users/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Intermediates/******.build/Debug-iphonesimulator/******-internal\ Beta\ Test.build/Objects-normal/i386/******-internal\ Beta\ Test_dependency_info.dat -o /Users/dinakarsoma2/Library/Developer/Xcode/DerivedData/******-blnbgtkobwzputaagcrtirppgsho/Build/Products/Debug-iphonesimulator/******-internal\ Beta\ Test.app/******-internal\ Beta\ Test
ld: warning: directory not found for option '-L\"/Users/dinakarsoma2/Desktop/Patches_test/3.0/*****/*****/External\ Libraries/Flurry\"'
ld: warning: directory not found for option '-L\"/Users/dinakarsoma2/Desktop/Patches_test/3.0/*****/*****/External\ Libraries/TestFlight\ SDK\"'
ld: warning: directory not found for option '-F/Users/dinakarsoma2/Desktop/Patches_test/3.0/*****/../../../../../../Downloads'
ld: library not found for -lFlurry
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As anyone faced a silmilar issue.. Plz help me with your thoughts. The issue looks a small one but I am struck with this for the past couple of hours.
Any help is appreciated.. thanks in advance
Finally fixed the issue... The issue was a very silly one..
Posting the same here if by any chance if someone else gets struck with a similar issue..
In Build settings -> Search Paths - The path for external providers (My case - Testflight,flurry etc). In the path the there is a space which is encoded and replaced with "\",etc.
I have removed extra character in the path which solved my issue..
ex:my path - "$(SRCROOT)/TargetName/External Libraries/TestFlight SDK"
its encoded as "$(SRCROOT)/TargetName/External Libraries/TestFlight \SDK"
removing the "\" solved the case..
This question already has answers here:
‘ld: warning: directory not found for option’
(32 answers)
Closed 9 years ago.
I moved the entire folder for the app I'm working on in Xcode from one place to another on my computer and got the warning ld: warning: directory not found for option followed by a long path.
I followed the accepted answer at Apple Mach-O Linker errors and I don't know what to do but still got the same warning.
EDIT: Here's the message I get, in case it's relevant:
Ld /Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator/GayHaikuTabbed.app/GayHaikuTabbed normal i386
cd /Users/joel/Development/GayHaiku
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
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/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator -L/Users/joel/Development/GayHaiku/GayHaikuTabbed -L/Users/joel/Development/GayHaiku -F/Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator -F. -FGayHaikuTabbed -FGayHaikuTabbedTests -F/Users/joel/Development/GayHaiku -F/Users/joel/Development/GayHaiku/../../../Downloads -F/Users/joel/Development/GayHaiku/../../Downloads -filelist /Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Intermediates/GayHaikuTabbed.build/Debug-iphonesimulator/GayHaikuTabbed.build/Objects-normal/i386/GayHaikuTabbed.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework Parse -framework Accounts -framework AdSupport -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework Twitter -lsqlite3 -lz -lz.1.1.3 -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework Security -framework Social -framework StoreKit -framework SystemConfiguration -framework UIKit -o /Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator/GayHaikuTabbed.app/GayHaikuTabbed
ld: warning: directory not found for option '-F/Users/joel/Development/GayHaiku/../../../Downloads'
EDIT: Turns out that cleaning the project removes the warning--but only until I build it again, and then the warning appears again. I've also tried deleting the derived data, but nothing doing. :(
EDIT: Well, the library search paths and header search paths are empty, but there are several paths in the framework search paths settings. I want to try deleting them, but I'm worried I'll wreck something else, since at this point I'm beyond where I really know what anything actually means; I'm just pressing buttons and keeping my fingers crossed.
Well, it did turn out to be one of the Framework Search Paths. I'm not sure which ones I deleted, and I'm not sure which one was responsible, but if you're having this issue and clearing the Library and Header Search Paths haven't worked, try the Framework.
you should take a look at this question ‘ld: warning: directory not found for option’ it might be what you're looking for :)
Although I am familiar to developing in Objective-C, I still consider myself a bit of a n00b when it comes to error interpretation. I working on an application for work that others are also working on. I believe we may have different versions of Xcode, and one developer has a PC (the others and I have a MacBook). I am using Xcode 4.5.1.
The Problem
I am getting the following Apple Mach-O Linker Error:
ld: truncated fat file. Slice from 68 to 2783300 is past end of file
with length 135 for architecture i386 clang: error: linker command
failed with exit code 1 (use -v to see invocation)
The full error is as follows (paths renamed):
Ld build/Debug-iphonesimulator/MyApp.app/MyApp normal i386
cd /Users/me/Documents/MyApp/trunk
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:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/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.0.sdk
-L/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -F/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -F/Users/me/Documents/MyApp/trunk -filelist /Users/me/Documents/MyApp/trunk/build/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList
-Xlinker -objc_abi_version -Xlinker 2 -lsqlite3.0 -v -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -framework MobileCoreServices -weak_framework Accounts -weak_framework AdSupport -weak_framework Social -framework CoreBluetooth -framework MediaPlayer -framework
QuartzCore -framework UIKit -framework Foundation -framework
CoreGraphics -framework FacebookSDK -o
/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM
3.1svn) Target: i386-apple-darwin11.4.2 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle -dynamic -arch i386 -ios_simulator_version_min 5.1.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
-o /Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp
-lcrt1.o -L/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -filelist /Users/me/Documents/MyApp/trunk/build/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList
-objc_abi_version 2 -lsqlite3.0 -no_implicit_dylibs -framework MobileCoreServices -weak_framework Accounts -weak_framework AdSupport
-weak_framework Social -framework CoreBluetooth -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework FacebookSDK -force_load /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
-framework Foundation -lobjc -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.ios.a
-F/Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator -F/Users/me/MyApp/trunk ld: truncated fat file. Slice from 68 to 2783300 is past end of file with length 135 for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I have found close to no documentation on this error. What's the problem? How do I resolve an error like this?
I read this answer somewhere,
Symbolic links to files and folders (in your case some framework) are turned into fat files when they are moved from MAC-OS/X to Windows. So whenever we copy-paste/checkout project frameworks from your MAC to windows or vice versa it gets changed, the files are modified in terms of symlinks.
So what you can do is just checkout your project files and replace the framework alone (please note the framework you are going to replace should be downloaded fresh or copied somewhere from a MAC , NOT WINDOWS).
Hope this helps someone!