Dylibs and OS X

元气小坏坏 提交于 2019-12-06 03:19:27

问题


I am trying to run a program called vowpal-wabbit (version 6.0) in mac os x.

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

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

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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/10820981/dylibs-and-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!