Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cocoapods 引入编译错误 #80

Closed
charsdavy opened this issue Mar 11, 2019 · 4 comments
Closed

cocoapods 引入编译错误 #80

charsdavy opened this issue Mar 11, 2019 · 4 comments
Assignees

Comments

@charsdavy
Copy link

charsdavy commented Mar 11, 2019

报错信息:

Undefined symbols for architecture x86_64:
  "_clogan_debug", referenced from:
      -[XXX setEnableDebug:] in libXXX.a(XXX.o)
  "_clogan_write", referenced from:
      ___41-[XXX writeLog:type:level:modul:]_block_invoke in libXXX.a(XXX.o)
  "_clogan_init", referenced from:
      -[XXX startWithKey:iv:] in libXXX.a(XXX.o)
  "_clogan_open", referenced from:
      -[XXX startWithKey:iv:] in libXXX.a(XXX.o)
      ___41-[XXX writeLog:type:level:modul:]_block_invoke in libXXX.a(XXX.o)
  "_clogan_flush", referenced from:
      -[XXX _flashInQueue] in libXXX.a(XXX.o)
      ___41-[XXX writeLog:type:level:modul:]_block_invoke in libXXX.a(XXX.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Podfile文件配置:

platform :ios, '9.3'
use_modular_headers!
# use_frameworks!

依赖关系:
boss(主项目)->B(模块项目)
B项目中包含 Logan 库的源代码。

环境:
工程项目使用cocoapods管理开源库,内含objc和swift。现引入logan库,内含c代码库。

各位大神,
请问有遇到这样问题的吗?可否劳烦大神指点迷津?
谢谢

@jiangteng
Copy link
Member

Logan中包含了一些c库,使用use_frameworks的方式会导致c库编译出问题
暂时解决方案可以参考#29

@charsdavy
Copy link
Author

@jiangteng 你好,感谢你的回复。
不过,我的podfile文件中没有使用 use_frameworks 的方式。
问题中我已经贴出了我的podfile配置文件。

@jiangteng
Copy link
Member

use_modular_headers也会导致同样的问题。暂时解决方案可以参考#29

@charsdavy
Copy link
Author

@jiangteng 谢谢

@charsdavy charsdavy changed the title cocopods 引入编译错误 cocoapods 引入编译错误 Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants