【问题标题】:What is "Other Linker Flags" issue in Xcode build settings?Xcode 构建设置中的“其他链接器标志”问题是什么?
【发布时间】:2018-12-11 23:53:45
【问题描述】:

我有一个正在开发的 cocos2d-x 项目,我向其中添加了 cocoapods,最初“其他链接器标志”中的所有内容都是 $(_COCOS_LIB_IOS_BEGIN) 和 $(_COCOS_LIB_IOS_END) 一切正常,但后来我添加了google-mobile-ads 和 amazon ads 到我的 pod 文件并运行 pod install 并说要将 $(inherited) 添加到我的其他链接器标志目标中,我做了但后来我收到此错误,如果我删除 ($inherited) 一切都会构建很好,如果我保留 ($inherited) 并删除 $(_COCOS_LIB_IOS_BEGIN) 和 $(_COCOS_LIB_IOS_END) 一切都很好,但是当我拥有全部 3 个时,我得到了错误?

【问题讨论】:

  • 只需在您的框架搜索路径中检查一次,有时在此处附加多个路径。只需删除重复项 - 项目 -> 构建设置 -> 框架搜索路径 - 双击并检查那里。
  • 我遵循了这一点,只是添加了游戏控制器框架,但是当我只有 $(_COCOS_LIB_IOS_BEGIN) & (_COCOS_LIB_IOS_END) 而没有添加“$(inherited)”标志时,它为什么在没有游戏控制器的情况下构建得很好?@ 987654322@

标签: ios xcode cocoapods cocos2d-x cocos2d-x-3.0


【解决方案1】:
Add config in pod file.

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if ['pod name', 'pod name',].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
        end
    end
end

【讨论】:

  • 我遵循了这一点,只是添加了游戏控制器框架,但是当我只有 $(_COCOS_LIB_IOS_BEGIN) 和 (_COCOS_LIB_IOS_END) 而没有添加“$(inherited)”标志时,它为什么在没有游戏控制器的情况下构建得很好?@ 987654321@
猜你喜欢
  • 1970-01-01
  • 2015-01-24
  • 1970-01-01
  • 2017-11-14
  • 1970-01-01
  • 1970-01-01
  • 2016-05-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多