构建VTK时:错误:不匹配'operator<<'

时间:2018-03-14 23:34:34

标签: ubuntu cmake vtk

我正在尝试在Kubuntu VIRTUAL计算机上安装vtk-6.0.0。在我将vtk配置和生成文件引入简单更改后,我设法运行make命令后,make build停止了以下消息:

In file included from /home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Common/Core/vtkObject.h:43:0,
                 from /home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Rendering/Core/vtkGenericVertexAttributeMapping.h:29,
                 from /home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Rendering/Core/vtkGenericVertexAttributeMapping.cxx:15:
/home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Rendering/Core/vtkGenericVertexAttributeMapping.cxx: In member function ‘void vtkGenericVertexAttributeMapping::AddMapping(int, const char*, int, int)’:
/home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Rendering/Core/vtkGenericVertexAttributeMapping.cxx:89:7: error: no match for ‘operator<<’ (operand types are ‘vtkOStreamWrapper’ and ‘std::ostringstream {aka std::__cxx11::basic_ostringstream<char>}’)
       << attributeName);
/home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Common/Core/vtkSetGet.h:509:22: note: in definition of macro ‘vtkWarningWithObjectMacro’
             << "): " x << "\n\n";                               \
                      ^
/home/mazen/Desktop/VTK/VTK_6.0.0/VTK-6.0.0/Rendering/Core/vtkGenericVertexAttributeMapping.cxx:88:5: note: in expansion of macro ‘vtkWarningMacro’
     vtkWarningMacro("Replacing existing mapping for attribute "
     ^~~~~~~~~~~~~~~

我无法理解编译器在打破这些消息时缺少什么。

我已将make输出转储到日志文件中,该文件可通过this link访问。现在通过no match for ‘operator<<’上的Line 39消息更加清晰。但是,代码必须正确,因为它是原始的vtk代码,此处不会引入任何更改。

非常感谢你提前

0 个答案:

没有答案