首页 > 解决方案 > 编译 cython 生成的 cpp 时如何解决 Visual Studio 2010 中的错误 C2719

问题描述

我正在尝试按照以下过程安装 python 模块以使用 PCL 库(用 C++ 编写并使用 Eigen 库):https ://github.com/strawlab/python-pcl

不幸的是,当我尝试构建 septup 文件时,我收到了 C2719 错误(有关详细信息,请参阅屏幕截图)。PNG

导致错误的行代码如下:

    __pyx_vtable_3pcl_4_pcl_OctreePointCloudSearch._VoxelSearch = (void (*)(struct __pyx_obj_3pcl_4_pcl_OctreePointCloudSearch *,  struct pcl::PointXYZ, std::vector<int>  &))__pyx_f_3pcl_4_pcl_22OctreePointCloudSearch__VoxelSearch;

(详细代码见https://pastebin.com/W0m9wzzc

阅读后:https ://ofekshilon.com/2010/05/05/stdvector-of-aligned-elements/

我知道我必须调整代码的语法以明确对象在 16 字节边界上对齐。

我的问题显然与那个问题相同:当代码中不存在代码行时,如何在 Visual Studio 2010 C++ 中解决错误 C2719

我或多或少可以假设导致问题的代码部分与struct pcl::PointXYZ, std::vector<int> &)

不幸的是,我对 C++ 完全陌生,我并不真正理解代码在做什么,因此我无法对其进行调整以使其工作。

帮助将不胜感激:)

规格:Cython 0.25.2 PCL 1.6 VS 2010

标签: c++compiler-errorsstdeigencythonize

解决方案


推荐阅读