1
我正在嘗試構建一個包含第三方靜態庫和我的一些源代碼的可可豆莢。我無法讓鏈接器找到該庫。我的目錄結構是:爲第三方靜態庫創建podspec
classes
-- (my .m and .h files)
libs
foo.z #-- third party static library
當我建,我得到的鏈接錯誤:
ld: library not found for -llibs/foo.a
我podspec如下
Pod::Spec.new do |s|
s.name = "FOO"
s.version = "0.0.1"
s.summary = "summary"
s.description = <<-DESC
description
DESC
s.homepage = "xxx"
s.license = 'MIT'
s.author = { "me" => "[email protected]" }
s.platform = :ios, '6.1'
s.ios.deployment_target = '6.1'
s.source = { :git => "https://github.com/<some repository>" }
s.source_files = 'Classes', 'Classes/**/*.{h,m}'
s.preserve_paths = 'libs/foo.a'
s.vendored_library = 'libs/foo.a'
s.library = 'foo'
s.public_header_files = 'Classes/**/*.h'
s.requires_arc = true
end
運氣好嗎?我有我的靜態庫類似的問題,但在我的情況下,我得到重複符號的錯誤。 – phi