错误LNK2001当包括“pcl_visualizer.h” [英] error LNK2001 when including "pcl_visualizer.h"
问题描述
#include< pcl / point_types.h>
#include< pcl / io / pcd_io.h>
#include< pcl / kdtree / kdtree_flann.h>
#include< pcl / features / normal_3d.h>
#include< pcl / surface / gp3.h>
没有任何问题,但是当我添加
#include< pcl / visualization / pcl_visualizer.h>
给我的代码我收到LNK2001错误。
Fehler 51错误LNK2001:Nichtaufgelöstesexternes符号public:virtual void __cdecl pcl :: visualization :: PCLVisualizer :: FPSCallback :: Execute(class vtkObject *,unsigned long,void *) (?执行@ FPSCallback @ PCLVisualizer @ visualization @ pcl @@ UEAAXPEAVvtkObject @@ KPEAX @ Z)
我认为有一个图书馆缺失但我无法弄明白哪一个。这是与我的程序的附加依赖关系的列表:
- pcl_common_debug.lib
- pcl_io_debug。 lib
- pcl_kdtree_debug.lib
- pcl_features_debug.lib
- pcl_surface_debug.lib
- pcl_search_debug.lib
- pcl_visualization_debug.lib
- vtkCommonCore-6.1.lib
- vtksys- 6.1.lib
- 和一些opencv库
任何人都可以告诉我哪个图书馆缺少?
提前感谢
编辑:
我基于greedy_projection.cpp代码创建了一个小型的cpp文件。感谢drescherjm的建议,我使用了cmake来创建项目,我可以编译没有错误。然后我想把这些东西放在我的另一个项目中,但发生同样的错误。
现在我发现错误的原因是\clr标志。我有一个Windows.Forms项目,所以它是用\clr编译的。 greedy_projection.cpp项目编译时没有这个标志。有没有什么办法避免与\clr的pcl_visualizer.h的不兼容?
我可以解决问题! p>
我刚刚评论了
struct FPSCallback:public vtkCommand
pcl / visualization / pcl_visualizer.h的功能。然后一切都很好。我不需要FPSCallback,所以它是一个完美的解决方案,我运行我的代码与\clr支持。
感谢drescherjm的帮助!!
I want to visualize a point cloud using the point-cloud-library. I already included:
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/features/normal_3d.h>
#include <pcl/surface/gp3.h>
without any problem, but when I add
#include <pcl/visualization/pcl_visualizer.h>
to my code I receive an LNK2001 error.
Fehler 51 error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __cdecl pcl::visualization::PCLVisualizer::FPSCallback::Execute(class vtkObject *,unsigned long,void *)" (?Execute@FPSCallback@PCLVisualizer@visualization@pcl@@UEAAXPEAVvtkObject@@KPEAX@Z)"
I think there is a library missing but I can't figure out which one. This is the list with the additional dependencies of my program:
- pcl_common_debug.lib
- pcl_io_debug.lib
- pcl_kdtree_debug.lib
- pcl_features_debug.lib
- pcl_surface_debug.lib
- pcl_search_debug.lib
- pcl_visualization_debug.lib
- vtkCommonCore-6.1.lib
- vtksys-6.1.lib
- and some opencv libs
can anyone tell me which library is missing?
Thanks in advance!
edit:
I created a little cpp-file based on the greedy_projection.cpp code. Thanks to the advice of drescherjm, I used cmake to create the project and I could compile it without errors. Then I wanted to include the stuff in my other project but the same error occurred. Now I figured out, that the reason for the error is the \clr flag. I have a Windows.Forms Project so it is compiled with \clr. The greedy_projection.cpp Project was compiled without this flag. Is there any way to avoid this incompatibility of pcl_visualizer.h with \clr?
I could solve the issue!
I just commented the code inside of the
struct FPSCallback : public vtkCommand
function of pcl/visualization/pcl_visualizer.h. Then everything compiled fine. I dont need the FPSCallback so it's a perfect solution for me to run my code with \clr support.
Thanks drescherjm for your help!!
这篇关于错误LNK2001当包括“pcl_visualizer.h”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!