小牛:库未找到-lwfdb [英] Mavericks: library not found for -lwfdb

查看:342
本文介绍了小牛:库未找到-lwfdb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

10.8 10.9 打破了我的 WFDB 安装,库未找到 -lwfdb

Moving from 10.8 to 10.9 broke my WFDB installation, library not found for -lwfdb.

此程序

#include <wfdb/wfdb.h>
int main(void) { return 0; }

这是链接错误(因为小牛, -I / usr / include目录已被列入,否则的编译的错误):

errors on linking (since Mavericks, -I/usr/include has to be included, otherwise the compiler errors):

567 ~/  clang -I/usr/include c.c -o c -lwfdb
ld: library not found for -lwfdb


我试过还加入 -L / usr / lib目录 (其中 libwfdb.10.5.20.dylib libwfdb.10.dylib libwfdb.dylib 的位置),但 LD 仍然无法找到 -lwfdb


I've tried also adding -L/usr/lib (where libwfdb.10.5.20.dylib, libwfdb.10.dylib and libwfdb.dylib are located), but ld still can't find -lwfdb,

好像完全删除 GCC 小牛。在 LD_LIBRARY_PATH 似乎是运行时只。一切都在山狮的工作。 还有什么我应该尝试一下呢?

Seems like Mavericks completely removed gcc. The LD_LIBRARY_PATH seems to be runtime-only. Everything worked under Mountain Lion. What else should I try?

细读后铛的 -v erbose输出(续前)...

After perusing clang's -verbose output (continued below) ...

568 ~/  clang -v -I/usr/include c.c -o c -lwfdb
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name c.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 224.1 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -I /usr/include -fdebug-compilation-dir /Users/blaise/ -ferror-limit 19 -fmessage-length 170 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/64/3l9hbm994q37l_bw79kf15bm0000gp/T/c-2iLIU4.o -x c c.c
clang -cc1 version 5.0 based upon LLVM 3.3svn default target x86_64-apple-darwin13.0.0
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks (framework directory)
End of search list.
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -o c /var/folders/64/3l9hbm994q37l_bw79kf15bm0000gp/T/c-2iLIU4.o -lwfdb -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/lib/darwin/libclang_rt.osx.a
ld: library not found for -lwfdb
clang: error: linker command failed with exit code 1 (use -v to see invocation)

...我已经把 libwfdb.10.5.20.dylib libwfdb.dylib LN -S / usr / lib目录里面编为1号文件) <$c$c>/Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/在的及其 usr / lib目录

... I have placed libwfdb.10.5.20.dylib and libwfdb.dylib (ln -sed to the 1st file) from /usr/lib inside /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ in its usr/lib.

现在程序链接的罚款。 但是,这肯定不可能是一个长期的解决方案?什么是10.9?例如进行的最佳方式里面添加一个当前链接 / usr / lib目录 -syslibroot 将打破每个X code升级.. 。没有好。

The program now links fine. But, this surely can't be a long-term solution? What is the best way to proceed in 10.9? E.g. adding a link to /usr/lib inside current -syslibroot would break on each Xcode upgrade ... no good.

推荐答案

尝试铛-v -I / usr / include目录CC -OC -lwfdb 为详细输出什么试图寻找 -lwfdb 何时做。然后,验证文件的存在。

Try clang -v -I/usr/include c.c -o c -lwfdb for verbose output of what clang tries to do when searching for -lwfdb. Then, verify the files are there.

这篇关于小牛:库未找到-lwfdb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆