I have one .cpp file which includes files from two subdirectories(subfolders linoise and noiseutils). I am trying to expose c++ class to python (I tried World example but when I try this more complex task I get error). I am usimh CMakeLists.txt to compile and create .so files. ANd it works fine, it creates three .so libraries (one in working directory, one in noiseutils, and one in libnoise).
when I try
import map
it get error map.so: undefined symbol: _ZTIN5noise6module6ModuleE
project (map)
cmake_minimum_required(VERSION 2.8)
find_package(PythonLibs)
include_directories (${PYTHON_INCLUDE_DIRS})
find_package(Boost 1.45.0 COMPONENTS python)
include_directories (${Boost_INCLUDE_DIRS})
set (LIBNOISE_PATH ${MY_SOURCE_DIR}/libnoise)
set (LIBNOISEUTILS_PATH ${MY_SOURCE_DIR}/noiseutils)
add_subdirectory(libnoise)
add_subdirectory(noiseutils)
add_library (
map SHARED
Wrapped.cpp
)
target_link_libraries (
map
boost_python
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
)
Do I need somehow to connect all three .so libraries or is it already in one file in working directory ? (It generates Make file, compiles and generates .so files, I tried to remove lib from name to be same as in wrapped file but it still throws error)