example: custom numeric type
This pull request is an example of building against EigenPy to expose Eigen objects with custom numeric types from C++. This is in response to #365.
This example at time of PR builds and installs, but not fully correctly. It doesn't install usable Python bindings, so the example Python code is not runnable. Maybe you could do that last step? So that the built bindings can actually be used in Python?
TODO:
- [ ] Remove useless files
- [ ] SImplify cmake usage
- [ ] Extend Python test with the creation of Numpy arrays used by a C++ program
I tried to use the code in this PR, and it doesn't install correctly on my Mac. I observe the following issues:
- I needed to change line 3 in
CMakeLists.txttocmake_minimum_required(VERSION 3.10) - The built library, when installed, has extension
.dylibinstead of.so - The build library's name starts with
lib, but it needs to just start with the actual name of the library. - If imported, I get missing symbols:
import libeigenpy_example_custom_numeric_type
ImportError: dlopen(/usr/local/lib/libeigenpy_example_custom_numeric_type.so, 0x0002): symbol not found in flat namespace '_EIGENPY_ARRAY_API'
I think all of these are issues with the CMakeLists.txt file.
I would love to be able to build upon this to work on some problems I'm seeing with custom numeric types in EigenPy, and make this example more complete, but I am finding the setup stuff is a barrier. Thanks!