问题描述
我试图运行在Mac OS X称为vowpal-wabbit(6.0版本)程序。
I am trying to run a program called vowpal-wabbit (version 6.0) in mac os x.
我用自制安装一些东西,如LIB工具,更重要的,升压。
I've used homebrew to install some things, such as lib tools and, importantly, boost.
不过 - 我发现,即使
However -- I'm finding that, even though
/usr/local/Cellar/boost/1.49.0/lib
显然拥有所有升压库(包括LIB boost_program_options.dylib)...
Clearly has all the boost libs, (including lib boost_program_options.dylib)...
该错误消息试图运行二进制时,我得到的是:
The error message i get when trying to run a binary is :
dyld: Library not loaded: libboost_program_options.dylib
我运行时,让,以建立该二进制得到相同的(基本上)错误从头开始:
I get the same (basically) error when running "make" to build this binary from scratch :
ld: library not found for -lboost_program_options
所以...我想我的问题是:如何才能让我的编译的二进制看的libboost_program_options.dylib?或者可以选择...我怎么能得到大众上运行OS X狮子(6.0版本)。
So ... I guess my question is : How can I get my compiled binary to "see" the libboost_program_options.dylib ? Or alternatively... how can I get vw (version 6.0) running on os x lion.
推荐答案
我猜 /usr/local/Cellar/boost/1.49.0/lib
是没有在任 DYLD_LIBRARY_PATH
或 DYLD_FALLBACK_LIBRARY_PATH
。你可以导出这些要么在您的环境,或者你可以从符号链接的/ usr / local / lib目录
。
I'll guess that /usr/local/Cellar/boost/1.49.0/lib
is not on either DYLD_LIBRARY_PATH
or DYLD_FALLBACK_LIBRARY_PATH
. You could export either of those in your environment, or you could symlink the Boost libraries from /usr/local/lib
.
要小心,不要消灭 DYLD_FALLBACK_LIBRARY_PATH
的内容,但!从 dyld的
手册页,它的默认值是 $(HOME)/ lib目录下:在/ usr / local / lib目录:/ lib目录:在/ usr / lib目录
。
Be careful not to wipe out the contents of DYLD_FALLBACK_LIBRARY_PATH
, though! From the dyld
man page, the default value for this is $(HOME)/lib:/usr/local/lib:/lib:/usr/lib
.
这篇关于Dylibs和OS X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!