2011-08-10 57 views
3

我在使用庫方面很新,而且我遇到了一些問題。在Visual Studio 2010中使用PCL

我已經在我的電腦上安裝了PCL和所有依賴項(Windows 7,32位),我可以構建和使用簡單的示例,如that "Simple Cloud Visualization" example。但是如果我想使用more complete sample,Visual Studio 2010會報告鏈接錯誤。

如果我理解正確,我沒有在「鏈接器/輸入」中包含所有必需的「附加依賴項」。我試圖包含lib目錄下的所有.lib文件,但錯誤報告仍然相同。

有誰知道,應該將哪個.lib添加爲「附加依賴項」來完成更完整的示例工作?或者是其他地方的問題?

錯誤報告:

1> main.obj:錯誤LNK2019:解析外部符號? 「市民:類vtkProperty * __thiscall vtkActor ::的getProperty(無效)」(@的getProperty @@ vtkActor @@ QAEPAVvtkProperty XZ)在函數「public:bool __thiscall pcl :: visualization :: PCLVisualizer :: addSphere(struct pcl :: PointXYZ const &,double,class std :: basic_string,class std :: allocator> const &,int)」( ?? $ addSphere @ UPointXYZ @ PCL @@@ PCLVisualizer @ @可視PCL @@ @ QAE_NABUPointXYZ 2 @ NABV?$ basic_string的@ DU?$ char_traits @ d @ @@ STD V'$分配器@ d @ @@ 2 STD @@ H @ Z) 1> main.obj:錯誤LNK2019:無法解析的外部符號「void __cdecl pcl :: co在函數「public:bool __thiscall pcl :: visualization」中引用的「nsole :: print(enum pcl :: console :: VERBOSITY_LEVEL,char const *,...)」(?print @ console @ pcl @@ YAXW4VERBOSITY_LEVEL @ 12 @ PBDZZ) :: PCLVisualizer :: addSphere(struct pcl :: PointXYZ const &,double,class std :: basic_string,class std :: allocator> const &,int)「(?? $ addSphere @ UPointXYZ @ pcl @@@ PCLVisualizer @ visualization @ pcl @@ QAE_NABUPointXYZ @ 2 @ NABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V $ $ allocator @ D @ 2 @@ std @@ H @ Z) 1> main.obj:error LNK2019:無法解析的外部符號「public:__thiscall vtkSmartPointer ::〜vtkSmartPointer(void)」(?? 1?$ vtkSmartPointer @)中引用的「公共:__thiscall vtkSmartPointerBase ::〜vtkSmartPointerBase(void)」(?? 1vtkSmartPointerBase @@ QAE @ XZ) VvtkLODActor @@@@ QAE @ XZ) 1> main.obj:error LNK2019:無法解析的外部符號「public:__thiscall vtkSmartPointerBase :: vtkSmartPointerBase(void)」( ?0vtkSmartPointerBase @@ QAE @ XZ)在函數「public:__thiscall vtkSmartPointer :: vtkSmartPointer(void)」中引用 1> main.obj:error LNK2019 :解析的外部符號 「公共:__thiscall vtkSmartPointerBase :: vtkSmartPointerBase(類vtkSmartPointerBase常量&)」(?? 0vtkSmartPointerBase @@ @ QAE @@ ABV0 Z)在函數引用 「公共:__thiscall vtkSmartPointer :: vtkSmartPointer(類vtkSmartPointer常量&)」 (?0?$ vtkSmartPointer @ VvtkProp @@@@ QAE @ ABV0 @@ Z) 1> main.obj:error LNK2019:無法解析的外部符號「public:__thiscall vtkSmartPointerBase :: vtkSmartPointerBase(class vtkObjectBase *)」 (vtkSmartPointer const &)「(?? $?0VvtkLODActor @@@?$ $ vtkSmartPoin ter @ VvtkProp @@@@ QAE @ ABV?$ vtkSmartPointer @ VvtkLODActor @@@@@ Z) 1> main.obj:error LNK2019:無法解析的外部符號「public:class vtkSmartPointerBase & __thiscall vtkSmartPointerBase :: operator =(class vtkObjectBase *)「(?? 4vtkSmartPointerBase @@ QAEAAV0 @ PAVvtkObjectBase @@@ Z)參考函數」public:class vtkSmartPointer & __thiscall vtkSmartPointer :: operator =(class vtkSmartPointer const &)「(?? $?4VvtkLODActor @@@?$ vtkSmartPointer @ VvtkProp @@@@ QAEAAV0 @ ABV?$ vtkSmartPointer @ VvtkLODActor @@@@@ Z)

回答

1

可能是您安裝了錯誤的PCL版本(64位/ 32位)。檢查你的VS版本並相應地安裝PCL。請注意,即使您使用的是64位系統,您的編譯器也可能以32位工作。