PCL1.9.2+VS2017 报错Generic Warning 解决办法
- 最近新安装了PCL1.9.2,但是每次在运行程序时总会报警告:“Generic Warning”。虽然程序能够正常运行,但是强迫症必须解决掉。百度了很多基本都是加一些头文件。
//报错信息
Generic Warning: In c:\vtk-8.1.2\rendering\core\vtkrenderwindow.cxx, line 1480
vtkRenderWindow::GetPainterDeviceAdapter was deprecated for VTK 8.1 and will be removed in a future version.Generic Warning: In c:\vtk-8.1.2\rendering\core\vtkmapper.cxx, line 233
vtkMapper::GetGlobalImmediateModeRendering was deprecated for VTK 8.1 and will be removed in a future version.Generic Warning: In c:\vtk-8.1.2\rendering\core\vtkrenderwindow.cxx, line 1480
vtkRenderWindow::GetPainterDeviceAdapter was deprecated for VTK 8.1 and will be removed in a future version.
//百度的解决办法
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
- 但是依然没有解决,最后在谷歌上找到了答案:
问题讨论过程:https://github.com/PointCloudLibrary/pcl/issues/2619
最终解决办法:https://github.com/anelsalas/PCL_1_9_1_prebuild_pcl_visualization_release.dll
Anel Salas 重新编译了pcl_visualization_release.dll,下载后放在路径“C:\Program Files\PCL 1.9.1\bin”下替换即可。注意:只重新编译了“release”版本,因此VS运行必须在release下才会不报错。