I am trying to make a very simple C++ library wit Python bindings. Everything is installed using Homebrew:
brew install python python3
brew linkapps python3
brew install boost boost-python --with-python3
CMakeLists.txt contains check for libraries:
#### Other sources #######
find_package(PythonLibs)
# Find Boost and add to include dirs
find_package(Boost COMPONENTS python3 system)
find_package(Boost REQUIRED COMPONENTS system)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()
include_directories(${PYTHON_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR})
Anything that I tried outputs this error:
Undefined symbols for architecture x86_64:
"boost::python::instance_holder::deallocate(_object*, void*)", referenced from: boost::python::objects::make_holder<0>::apply, boost::mpl::vector0 >::execute(_object*) in brain.cpp.o
"boost::python::instance_holder::install(_object*)", referenced from: boost::python::objects::make_holder<0>::apply, boost::mpl::vector0 >::execute(_object*) in brain.cpp.o
"boost::python::instance_holder::allocate(_object*, unsigned long, unsigned long)", referenced from: boost::python::objects::make_holder<0>::apply, boost::mpl::vector0 >::execute(_object*) in brain.cpp.o
"boost::python::instance_holder::instance_holder()", referenced from: boost::python::objects::value_holder::value_holder(_object*) in brain.cpp.o "boost::python::instance_holder::~instance_holder()", referenced from: boost::python::objects::value_holder::value_holder(_object*) in brain.cpp.o boost::python::objects::value_holder::~value_holder() in brain.cpp.o "boost::python::throw_error_already_set()", referenced from: _object* boost::python::expect_non_null<_object>(_object*) in brain.cpp.o
Have anyone else encountered this problem? Could it be a problem with Homebrew?
برچسب:
نویسنده: استخدام کار