我现在能够构建我的iOS项目,但是我收到两个警告,如下所示,这真的让我感到烦恼:
ld: warning: directory not found for option
'-L/Users/brennon/Development/MobileMuse/BioAudio/../../Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/lib'
(我在几行中打破了编译器命令,徒劳无功):
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
似乎仍在尝试链接4.2 SDK,自从将我的开发机器升级到10.7以及因此Xcode以后就不再这样了。我已经搜索了Project和Target设置,似乎找不到任何仍然指向4.2的东西。有什么想法吗?
编辑:我尝试了dtuckernet的回答。在项目目录中运行grep -iRF iPhoneOS4.2.sdk .
产生了以下内容(抱歉这个混乱!)输出:
./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
将pbproject.pbxproj
中的条目更改为4.3
非常简单,但构建时仍会抛出相同的警告。清洁仍然无法解决任何问题。我只是想改变brennon.xcuerdatad
下的plist中的plist键感到不安。我确定问题出在这里或build-state
文件中,但不应该在干净的构建中刷新/重建吗?
答案 0 :(得分:0)
在你的项目设置中仍有一个引用到4.2。过去我使用grep来浏览项目中的所有文件并找到引用。见这个例子:
cd ~/Documents/MyProjectDirectory/
grep -iRF 4.2 .
这应该为您提供包含4.2的所有文件,并且应该很容易看到引用4.2 SDK的位置。
答案 1 :(得分:0)
不同的配置Debug / Release可能对目标iOS有不同的设置。检查您正在编译的配置是否符合您应该在其中设置的iOS预期。