我试图在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 ExportMACOSX_DEPLOYMENT_TARGET=10.11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/x86_64/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 -/Users/corrychapman/Library/Developer/Xcode/DerivedData/JanssonDev-dispcmnteuwiedaiazlbkwtztfcu/Build/Intermediates/JanssonDev.build/Debug/JanssonDev.build/Objects-normal/x86_64/JanssonDev_dependency_info.dat /Users/corrychapman/Library/Developer/Xcode/DerivedData/JanssonDev-dispcmnteuwiedaiazlbkwtztfcu/Build/Products/Debug/JanssonDev no_deduplicate -Xlinker -dependency_info -Xlinker -o
架构x86_64的未定义符号:"_json_array_get",引用于: main.o "_json_array_size“中的_main,引用于: main.o "_json_delete”中的_main,引用于: main.o "_json_loads“中的_json_decref,引用于: main.o "_json_object_get”中的_main,引用自: main.o中的_main "_json_string_value",引用自:_main in main.o :符号(S),x86_64 clang: x86_64: linker命令失败,退出代码1(使用-v查看调用)
发布于 2018-03-26 14:20:32
找到了。生成设置->链接->其他链接标志:-ljansson
https://stackoverflow.com/questions/49456782
复制相似问题