Problem when package PCL #3940
Replies: 2 comments
-
Hi, I had the same problem as you, using pcl-1.8; I solved this by building my packaged using pcl-1.10. Good Luck! |
Beta Was this translation helpful? Give feedback.
-
find_package(PCL 1.8 REQUIRED) uses its dependent libpython.so, which may be different from the python version you use. include_directories(/where/your/pcl/install/include/pcl-1.8 ) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, everyone.
I want to make a PCL python wrapper, but after I build the .so and want to import it in python. It throws an error: dynamic module does not define module export function (PyInit_pcl_lib).
cmake_minimum_required(VERSION 3.0.2)
project(pybind_test)
set(PACKAGE_TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
find_package(PCL 1.8 REQUIRED)
add_subdirectory(cpp/pybind11)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
pybind11_add_module(pcl_lib cpp/src/pcl_lib.cpp)
target_link_libraries(pcl_lib PUBLIC pybind11::module ${PCL_LIBRARIES})
#include <pybind11/pybind11.h>
int add(int i, int j) { return i + j; }
PYBIND11_MODULE(pcl_lib, m){ m.doc() = "pcl plugin"; m.def("add", &add, "A function that adds two numbers"); }
Looking forward to your response, thank you. ^_^
Beta Was this translation helpful? Give feedback.
All reactions