我正在尝试构建一个包含第三方静态库和一些源代码的可可pod。我无法让链接器找到该库。我的目录结构是:
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" => "me@xyz.com" }
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
答案 0 :(得分:0)