【问题标题】:Xcode Openframeworks - ld: library not found for -lLeapXcode Openframeworks - ld:找不到-lLeap的库
【发布时间】:2016-02-26 12:10:48
【问题描述】:

在 Xcode 上运行时,我遇到了“ld: library not found for -lLeap”这个问题。但我添加了插件“ofxLeapMotion2”。

<pre>Ld bin/isosphereMiDiDebug.app/Contents/MacOS/isosphereMiDiDebug normal i386
    cd /Users/yuanshq/Documents/Openframework/apps/myApps/isosphereMiDi
    export MACOSX_DEPLOYMENT_TARGET=10.6
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/yuanshq/Documents/Openframework/apps/myApps/isosphereMiDi/bin -F/Users/yuanshq/Documents/Openframework/apps/myApps/isosphereMiDi/bin -F/Users/yuanshq/Documents/Openframework/apps/myApps/isosphereMiDi/../../../libs/glut/lib/osx -filelist /Users/yuanshq/Library/Developer/Xcode/DerivedData/isosphereMiDi-cxmrshpintlivwhfnjzrhmgsuevc/Build/Intermediates/isosphereMiDi.build/Debug/isosphereMiDi.build/Objects-normal/i386/isosphereMiDiDebug.LinkFileList -mmacosx-version-min=10.6 -dead_strip ../../../libs/poco/lib/osx/PocoCrypto.a ../../../libs/poco/lib/osx/PocoData.a ../../../libs/poco/lib/osx/PocoDataODBC.a ../../../libs/poco/lib/osx/PocoDataSQLite.a ../../../libs/poco/lib/osx/PocoFoundation.a ../../../libs/poco/lib/osx/PocoNet.a ../../../libs/poco/lib/osx/PocoNetSSL.a ../../../libs/poco/lib/osx/PocoUtil.a ../../../libs/poco/lib/osx/PocoXML.a ../../../libs/poco/lib/osx/PocoZip.a ../../../libs/tess2/lib/osx/tess2.a ../../../libs/glew/lib/osx/glew.a ../../../libs/cairo/lib/osx/cairo-script-interpreter.a ../../../libs/cairo/lib/osx/cairo.a ../../../libs/cairo/lib/osx/pixman-1.a ../../../libs/fmodex/lib/osx/libfmodex.dylib ../../../libs/rtAudio/lib/osx/rtAudio.a ../../../libs/openssl/lib/osx/crypto.a ../../../libs/openssl/lib/osx/ssl.a ../../../libs/glfw/lib/osx/libglfw3.a ../../../libs/FreeImage/lib/osx/freeimage.a ../../../libs/freetype/lib/osx/freetype.a -stdlib=libstdc++ -framework Accelerate -framework QTKit -framework GLUT /Users/yuanshq/Documents/Openframework/libs/openFrameworksCompiled/lib/osx/openFrameworksDebug.a -framework AGL -framework ApplicationServices -lLeap -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework QuickTime -framework AppKit -framework Cocoa -framework IOKit -framework CoreMIDI -framework CoreVideo -Xlinker -dependency_info -Xlinker /Users/yuanshq/Library/Developer/Xcode/DerivedData/isosphereMiDi-cxmrshpintlivwhfnjzrhmgsuevc/Build/Intermediates/isosphereMiDi.build/Debug/isosphereMiDi.build/Objects-normal/i386/isosphereMiDiDebug_dependency_info.dat -o /Users/yuanshq/Documents/Openframework/apps/myApps/isosphereMiDi/bin/isosphereMiDiDebug.app/Contents/MacOS/isosphereMiDiDebug

ld: 找不到 -lLeap 的库

clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

谢谢!!

【问题讨论】:

  • 好的,那么库的确切文件名是什么?
  • @trojanfoe 它是 ofxLeapMotion2,是 Leap Motion SDK 的包装器。
  • 不,我想知道文件的确切名称(例如libLeapMotion2.alibLeap.dylib)。
  • @trojanfoe 我认为是 libLeap.dylib,因为这是我可以在该插件中找到的唯一库文件。
  • OK 所以-lLeap 命令行选项是正确的; -L 必须丢失/错误。

标签: ios xcode cocoapods openframeworks leap-motion


【解决方案1】:

如果你使用cocoapods是因为你需要打开.xcworkspace

  • 关闭Xcode;
  • 运行pod installpod update
  • 打开新的.xcworkspace
  • CleanBuild 你的项目;
  • 现在,您可以正常run了。

【讨论】:

    猜你喜欢
    • 2017-03-21
    • 2014-06-25
    • 2020-11-25
    • 2014-04-18
    • 1970-01-01
    • 1970-01-01
    • 2015-12-13
    • 2016-05-28
    • 1970-01-01
    相关资源
    最近更新 更多