này được lái xe cho tôi điên, khi tôi cố gắng để biên dịch trên giả lập, mọi thứ đều ok, nhưng trên thiết bị tôi đã nhận lỗi này:ld: thư viện không tìm thấy cho -lz
ld: library not found for -lz
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1
Xin hãy giúp tôi hiểu nguồn gốc của vấn đề:
Ld /Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products/Debug-iphoneos/Fontenay-sous-Bois.app/Fontenay-sous-Bois normal armv7
cd /Users/ZConsulting/Desktop/Fontenay-sous-Bois
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
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/clang -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products
/Debug-iphoneos -F/Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products/Debug-iphoneos -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
/iPhoneOS5.0.sdk/Developer/Library/Frameworks -filelist /Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Intermediates/Fontenay-sous-Bois.build/Debug-iphoneos/Fontenay-sous-Bois.build/Objects-normal/armv7/Fontenay-sous-Bois.LinkFileList -dead_strip -fobjc-arc -miphoneos-version-min=5.0 -framework SenTestingKit -lz -lz.1.1.3 -framework MobileCoreServices
-framework SystemConfiguration -framework CFNetwork -framework CoreLocation -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/ZConsulting/Library/Developer/Xcode/DerivedData/Fontenay-sous-Bois-dhlecgdgtoldsadoctkyueriyius/Build/Products/Debug-iphoneos/Fontenay-sous-Bois.app/Fontenay-sous-Bois
EDIT:
tôi đã nhập khẩu khuôn khổ libz.1.1.3.dylib:
Các libz duy nhất mà tôi nhận được trong khuôn khổ Liên Kết là libz.1.1.3.dylib
Tôi đã nhập thư viện libz.1.1.3.dylib, vui lòng xem bản chỉnh sửa của tôi, đây là cách tôi biên dịch với trình mô phỏng, nhưng vì tôi cố gắng xây dựng một kho lưu trữ, tôi hiểu điều đó. – Luca
Có, và trình mô phỏng sử dụng một vị trí khác với thiết bị. Bạn nên nhập khẩu 'libz.dylib' chung hơn là' libz.1.1.3' cụ thể. Hãy thử 'find/Developer/Platforms -name libz.1.1.3.dylib' và kiểm tra xem nó có được tìm thấy trong cả hai 'iPhoneOS5.0.sdk' * và * 'iPhoneSimulator5.0.sdk'. Nếu nó không được tìm thấy, thì tôi đề nghị thay thế nó bằng 'libz.dylib'. Bạn nên có lý do thuyết phục để sử dụng phiên bản libz '1.1.3' để tham chiếu đến phiên bản cụ thể đó (nói chung các thư viện này tương thích lên) – Petesh
Khung libz duy nhất tôi có trong danh sách là' libz.1.1. 3.dylib', xin vui lòng có một cái nhìn o Cập nhật của tôi. – Luca