使用Eigen库时,遇到Eigen/***: No such file or directory的情况
通常Eigen3在/usr/include 或者/usr/local/include 目录下;在工程使用#include <Eigen/***> 时,就会遇到上述问题; 解决方案: 拷贝Eigen3目录下的Eigen目录到上一级目录 或者 使用 cd /usr/local/include sudo ln -sf eigen3/Eigen Eigen
NUMPY宏定义为NULL
numpy/core/include/numpy/__multiarray_api.h:1541:35: error: return-statement with a value, in function returning 'void' [-fpermissive] #define NUMPY_IMPORT_ARRAY_RETVAL NULL 在文件中 src/autogen_module/numpy_eigen_export_module.cpp 添加
@@ -253,6 +253,8 @@ BOOST_PYTHON_MODULE(libnumpy_eigen)
{
using namespace boost::python;
+++#undef NUMPY_IMPORT_ARRAY_RETVAL
+++#define NUMPY_IMPORT_ARRAY_RETVAL
Error with boost dependency
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
Could not find a package configuration file provided by "boost_python3"
(requested version 1.71.0) with any of the following names:
boost_python3Config.cmake
boost_python3-config.cmake
Add the installation prefix of "boost_python3" to CMAKE_PREFIX_PATH or set
"boost_python3_DIR" to a directory containing one of the above files. If
"boost_python3" provides a separate development package or SDK, be sure it
has been installed.
解决:
/kalibr/Schweizer-Messer/numpy_eigen/cmake/add_python_export_library.cmake:89
change
list(APPEND BOOST_COMPONENTS python3)
to
list(APPEND BOOST_COMPONENTS python)
|