Jansson在Xcode上

时间:2018-03-23 19:06:23

标签: c xcode jansson

我正在尝试在Xcode 7.3.1上测试Jansson。我按照说明安装,然后在没有工作时使用cMake,这也没有用。我认为Xcode无法找到Jansson库。在通过搜索此问题的大量建议后,我已经以多种不同的方式修改了项目标题和库路径。 Xcode 能够找到标题。另请注意,我可以安装Jansson并在Eclipse中运行它。任何见解都将不胜感激。

以下是来自Xcode的错误日志:

Ld / Users / corrychapman / Library / Developer / Xcode / DerivedData / JanssonDev-dispcmnteuwiedaiazlbkwtztfcu / Build / Products / Debug / JanssonDev normal x86_64     cd /Users/corrychapman/Desktop/jansson-2.11/JanssonDev     export MACOSX_DEPLOYMENT_TARGET = 10.11     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10。 11.sdk -L / Users / corrychapman / Library / Developer / Xcode / DerivedData / JanssonDev-dispcmnteuwiedaiazlbkwtztfcu / Build / Products / Debug -L / usr / local / lib -L ​​/ Users / corrychapman / Desktop / jansson-2.11 / JanssonDev - F / Users / corrychapman / Library / Developer / Xcode / DerivedData / JanssonDev-dispcmnteuwiedaiazlbkwtztfcu / Build / Products / Debug -filelist /Users/corrychapman/Library/Developer/Xcode/DerivedData/JanssonDev-dispcmnteuwiedaiazlbkwtztfcu/Build/Intermediates/JanssonDev.build/ Debug / JanssonDev.build / Objects-normal / x86_64 / JanssonDev.LinkFileList -mmacosx-version-min = 10.11 -Xlinker -no_deduplicate -Xlinker -dependency_info -Xlinker / Users / corrychapman / Library / Developer / Xcode / DerivedData / JanssonDev-dispcmnteuwiedaiazlbkwtztfcu /构建/中间体/ JanssonDev.build /调试/ JanssonDev.build /目标正常/ x86_6 4 / JanssonDev_dependency_info.dat -o / Users / corrychapman / Library / Developer / Xcode / DerivedData / JanssonDev-dispcmnteuwiedaiazlbkwtztfcu / Build / Products / Debug / JanssonDev

架构x86_64的未定义符号:   " _json_array_get",引自:       _main在main.o中   " _json_array_size",引自:       _main在main.o中   " _json_delete",引自:       main.o中的_json_decref   " _json_loads",引自:       _main在main.o中   " _json_object_get",引自:       _main在main.o中   " _json_string_value",引自:       _main在main.o中 ld:找不到架构x86_64的符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

1 个答案:

答案 0 :(得分:0)

找到它。构建设置 - >链接 - >其他链接器标志:-ljansson