tpengti / blam-windows-VS2013-

blam算法-改写成windows版本,去除了ROS框架,可直接输入点云数据测试
1 stars 2 forks source link

Eigen errors, PCL 1.81 and gtsam #2

Open antithing opened 7 years ago

antithing commented 7 years ago

Hi, thank you for making your code available. I am trying to build in visual studioo, and am getting the following errors:

1>PointCloudLocalization.obj : error LNK2005: "public: __int64 __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::rows(void)const " (?rows@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: __int64 __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,3,0,3,3> >::rows(void)const " (?rows@?$PlainObjectBase@V?$Matrix@N$02$02$0A@$02$02@Eigen@@@Eigen@@QEBA_JXZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: class Eigen::Matrix<double,3,3,0,3,3> & __cdecl Eigen::MatrixBase<class Eigen::Matrix<double,3,3,0,3,3> >::setIdentity(__int64,__int64)" (?setIdentity@?$MatrixBase@V?$Matrix@N$02$02$0A@$02$02@Eigen@@@Eigen@@QEAAAEAV?$Matrix@N$02$02$0A@$02$02@2@_J0@Z) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: class Eigen::Matrix<double,3,1,0,3,1> & __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,1,0,3,1> >::setZero(void)" (?setZero@?$DenseBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEAAAEAV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: class Eigen::Matrix<double,3,3,0,3,3> & __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,3,0,3,3> >::setZero(void)" (?setZero@?$DenseBase@V?$Matrix@N$02$02$0A@$02$02@Eigen@@@Eigen@@QEAAAEAV?$Matrix@N$02$02$0A@$02$02@2@XZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: __int64 __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::size(void)const " (?size@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: __int64 __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,3,0,3,3> >::size(void)const " (?size@?$EigenBase@V?$Matrix@N$02$02$0A@$02$02@Eigen@@@Eigen@@QEBA_JXZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: class Eigen::VectorBlock<class Eigen::Matrix<double,3,1,0,3,1>,-1> __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,1,0,3,1> >::tail(__int64)" (?tail@?$DenseBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEAA?AV?$VectorBlock@V?$Matrix@N$02$00$0A@$02$00@Eigen@@$0?0@2@_J@Z) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: class Eigen::Transpose<class Eigen::Matrix<double,3,1,0,3,1> > __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,1,0,3,1> >::transpose(void)" (?transpose@?$DenseBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEAA?AV?$Transpose@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@2@XZ) already defined in gtsam.lib(gtsam.dll)
1>PointCloudLocalization.obj : error LNK2005: "public: class Eigen::Transpose<class Eigen::Matrix<double,3,3,0,3,3> > __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,3,0,3,3> >::transpose(void)" (?transpose@?$DenseBase@V?$Matrix@N$02$02$0A@$02$02@Eigen@@@Eigen@@QEAA?AV?$Transpose@V?$Matrix@N$02$02$0A@$02$02@Eigen@@@2@XZ) already defined in gtsam.lib(gtsam.dll)
1>../bin\bslam.exe : fatal error LNK1169: one or more multiply defined symbols found

I have PCL 1.81, boost 1.64 and gtsam(fix/visualcpp14 branch)

Did you have this problem? Any tips you can give me to get the code building would be very much appreciated. Thanks again.

antithing commented 7 years ago

Ah, switching everything to static libs has solved this. Now, I am seeing:

1>pcl_visualization_release.lib(vtkVertexBufferObjectMapper.obj) : error LNK2001: unresolved external symbol __imp_glPointSize 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glColorPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glDisableClientState 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glEnableClientState 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glIndexPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glNormalPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol __imp_glVertexPointer 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::BindBuffer)(unsigned int,unsigned int)" (?BindBuffer@vtkgl@@3P6AXII@ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::DeleteBuffers)(int,unsigned int const *)" (?DeleteBuffers@vtkgl@@3P6AXHPEBI@ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::GenBuffers)(int,unsigned int *)" (?GenBuffers@vtkgl@@3P6AXHPEAI@ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::BufferData)(unsigned int,__int64,void const *,unsigned int)" (?BufferData@vtkgl@@3P6AXI_JPEBXI@ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::DisableVertexAttribArray)(unsigned int)" (?DisableVertexAttribArray@vtkgl@@3P6AXI@ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::EnableVertexAttribArray)(unsigned int)" (?EnableVertexAttribArray@vtkgl@@3P6AXI@ZEA) 1>pcl_visualization_release.lib(vtkVertexBufferObject.obj) : error LNK2001: unresolved external symbol "void (__cdecl* vtkgl::VertexAttribPointer)(unsigned int,int,unsigned int,unsigned char,int,void const *)" (?VertexAttribPointer@vtkgl@@3P6AXIHIEHPEBX@ZEA) 1>../bin\bslam.exe : fatal error LNK1120: 14 unresolved externals

f you have a minute, can you think of what link I might be missing? Thanks again!

tpengti commented 7 years ago

Hello, i put the relevant third party library file in the form of mail to you

antithing commented 7 years ago

Thank you! I have it building now, and running on test data. It seems much slower than the Blam demo video though, I am seeing around 200ms per frame. Did you manage to get this to run at real-time speeds?

Thanks again!