我目前有一个链接器错误,大约44个引用x86_64架构的未定义符号。所有这些都来自一个集成文件" libMagickCore.a"所以我试图为架构x86_64 libmagickcore.a""未定义的符号搜索解决方案。 我在这里看到了一个解决方案Undefined symbols for architecture x86_64 ImageMagick on Mac Lion,它解决了Mac Lion上的类似问题。我也看过ImageMagick板上的类似问题。我找到的线程和Stack Overflow链接似乎谈论包含或明确排除X11库。
我试图添加" -lX11" to"其他Linker Flags"在构建设置下,但我最终找不到"找不到-lX11的库。"因此,我也尝试将libX11.dylib从/ opt / X11 / lib拖到我的XCode项目中无济于事。关于ImageMagick板上类似问题的建议是使用" - without-wmf" " - 无需-X11"标志,但是我不知道在没有编译器错误的情况下添加它的构建设置的哪个键/值对"不支持的选项。"
论文是链接器错误:
Undefined symbols for architecture x86_64:
"_xmlAddAttributeDecl", referenced from:
_MSLAttributeDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGAttributeDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlAddChild", referenced from:
_MSLReference in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_MSLCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGReference in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
_SVGCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlAddDocEntity", referenced from:
_MSLEntityDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_MSLUnparsedEntityDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGEntityDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
_SVGUnparsedEntityDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlAddDtdEntity", referenced from:
_MSLEntityDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGEntityDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlAddElementDecl", referenced from:
_MSLElementDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGElementDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlAddNotationDecl", referenced from:
_MSLNotationDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGNotationDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlCleanupParser", referenced from:
_UnregisterMSLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_UnregisterSVGImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlCreateIntSubset", referenced from:
_MSLInternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGInternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlCreatePushParserCtxt", referenced from:
_ProcessMSLScript in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_ReadSVGImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlDetectCharEncoding", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlFree", referenced from:
_MSLAttributeDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGAttributeDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlFreeDoc", referenced from:
_SVGEndDocument in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlFreeInputStream", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlFreeParserCtxt", referenced from:
_ProcessMSLScript in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_ReadSVGImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlGetDocEntity", referenced from:
_MSLGetEntity in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGGetEntity in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlGetLastChild", referenced from:
_MSLCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlGetParameterEntity", referenced from:
_MSLGetParameterEntity in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGGetParameterEntity in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlInitParser", referenced from:
_RegisterMSLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_RegisterSVGImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlLoadExternalEntity", referenced from:
_MSLResolveEntity in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGResolveEntity in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlMalloc", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlNanoFTPClose", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoFTPConnect", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoFTPGet", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoFTPInit", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoFTPNewCtxt", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoHTTPCleanup", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoHTTPClose", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoHTTPMethod", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNanoHTTPRead", referenced from:
_ReadURLImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-url.o)
"_xmlNewCDataBlock", referenced from:
_MSLCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlNewCharRef", referenced from:
_MSLReference in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGReference in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlNewDoc", referenced from:
_MSLStartDocument in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGStartDocument in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlNewDtd", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlNewReference", referenced from:
_MSLReference in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGReference in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlParseChunk", referenced from:
_ProcessMSLScript in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_ReadSVGImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlParseExternalSubset", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlPopInput", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlPushInput", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlSplitQName", referenced from:
_MSLAttributeDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGAttributeDeclaration in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlStrdup", referenced from:
_MSLStartDocument in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGStartDocument in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlSubstituteEntitiesDefault", referenced from:
_ProcessMSLScript in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_ReadSVGImage in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlSwitchEncoding", referenced from:
_MSLExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGExternalSubset in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
"_xmlTextConcat", referenced from:
_MSLCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-msl.o)
_SVGCDataBlock in libMagickCore.a(magick_libMagickCore_6_Q8_la-svg.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:2)
通过添加" libxml2.2.tbd"解决了这个问题。进入"建立阶段"到项目和Link Binary与Libraries。