无法使用libxml2构建IOS ReactNative自己的库问题

时间:2019-09-16 08:29:02

标签: objective-c react-native libxml2

我添加了 标题搜索路径 $(SDKROOT)/ usr / include / libxml2

将库添加为 enter image description here

但是在构建项目时 我有错误:

Undefined symbols for architecture x86_64:
  "_xmlAddChild", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlC14NDocDumpMemory", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlCleanupParser", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlDocDumpMemoryEnc", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlDocGetRootElement", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlFreeDoc", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlMemoryDump", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlNewChild", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlNewNode", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlNewNs", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlNewProp", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlParseDoc", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlXPathEvalExpression", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlXPathFreeContext", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlXPathFreeObject", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlXPathNewContext", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
  "_xmlXPathRegisterNs", referenced from:
      -[Ecp signData:withCertpass:withData::] in libEcp.a(Ecp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

为什么图书馆没有定义“ xmlAddChild”

但是如果我在没有ReactNative的情况下创建相同的项目,那是可行的

出什么问题了?救命!

0 个答案:

没有答案