pybind11
pybind11 copied to clipboard
Undefined symbol when installing from source
I'm trying to build my C++ library in python. Everything work weel except for the source distributions. I can build wheels for windows an linux that work, but the result of '''python setup.py sdist' is not right.
I can install he package in ubuntu 16.04 LTS with pip and python 3.5 but I get an import error
typeinfo for ProjectName::ClassName
beeing ProjectName and ClassName the actual names of those elements.
My CMakeLists looks like this
cmake_minimum_required(VERSION 2.8.12)
project(projectname)
include_directories(SYSTEM ${project_INCLUDE_DIRS})
link_directories(${project_LIBRARY_DIRS})
FILE(GLOB PYBIND_SRC
./pybind.cpp
.
.)
FILE(GLOB EIGEN
.
.
.)
add_subdirectory(pybind11)
pybind11_add_module(projectname
${PYBIND_SRC}
${EIGEN}
)
The file structure is
project
|- .cpp
|- .h
eigen
|- eigen files
pybind
|- CMakeList.txt
|- Manifest.in
|- setup.py
|- projectname
|- - - pybind.cpp
In the setup.py file I have tried with the include_package_data and the package_data options, that didn't work either.
I'm pretty new using CMake and pybind/setuptools but I have searched and found nothing. I have tried including a target_link_libraries in the CMakeList file and moving the constructors to the header but it stil doesn't work.