ld: library not found for -lboost_python on MacOS

前端 未结 1 1045
温柔的废话
温柔的废话 2021-01-06 16:31

On Mac, I want to build the example Boost.Python code

hello.cpp

#include 

char const* greet()
{
    return          


        
1条回答
  •  不思量自难忘°
    2021-01-06 17:12

    Finally, I found there is no such libboost_python37.dylib in boost-python lib path

    $ ls /usr/local/Cellar/boost-python3/1.67.0_1/lib
    libboost_numpy37-mt.a      libboost_numpy37.a         libboost_python37-mt.dylib libboost_python37.dylib
    libboost_numpy37-mt.dylib  libboost_numpy37.dylib     libboost_python37-mt.a     libboost_python37.a
    

    So I created a soft link

    $ sudo ln -s libboost_python37.dylib libboost_python3.dylib
    

    I can compile my code now.

    0 讨论(0)
提交回复
热议问题