Boost Regex not playing welll with Snow leopard

China☆狼群 提交于 2019-12-19 10:19:43

问题


So I inherited code written in C++ that uses the Boost library. I could compile (using Code Blocks) and run the code on Linux Ubuntu but when I ported it over to the mac and installed the boost library, I can compile it using code blocks (and specifying the location of the regex libraries) but it won't run.

It just gives me the error:

$ ./BLAH_PD

dyld: Library not loaded: libboost_regex.dylib Referenced from: /Users/spinach/Desktop/B/BLAH/bin/Release/./BLAH_PD Reason: image not found Trace/BPT trap

I'm not sure what to do next but any help would be greatly appreciated.

David


回答1:


You need to set the DYLD_LIBRARY_PATH environment variable to include the path where you installed the compiled Boost libs.




回答2:


Did you follow these directions?
Boost.Regex is not a header only library. You will need to install/compile the .dynlib. If you did this, did you remember to correctly link it? (-llibboost_regex -LPATH_TO_BOOST_BIN)



来源:https://stackoverflow.com/questions/3729810/boost-regex-not-playing-welll-with-snow-leopard

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