Tuesday, August 27, 2013

Error 1:

 Linking CXX executable ../bin/feature_matching
  /usr/bin/ld: CMakeFiles/feature_matching.dir/src/feature_matching.o: undefined reference to symbol 'vtkSmartPointerBase::operator=(vtkObjectBase*)'
  /usr/bin/ld: note: 'vtkSmartPointerBase::operator=(vtkObjectBase*)' is defined in DSO /usr/lib/libvtkCommon.so.5.8 so try adding it to the linker command line
  /usr/lib/libvtkCommon.so.5.8: could not read symbols: Invalid operation
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/feature_matching] Error 1


Solution 1:


include_directories(/usr/include/vtk-5.8)

target_link_libraries(pcl_viz ${PCL_LIBRARIES} libvtkCommon.so libvtkFiltering.so libvtkRendering.so)


Error 2:

In file included from /home/sai/fuerte_workspace/perception_pcl_new/pcl16/include/pcl-1.6/pcl16/point_cloud.h:43:0,
                   from /home/sai/fuerte_workspace/perception_pcl_new/pcl16/include/pcl-1.6/pcl16/io/pcd_io.h:43,
                   from /home/sai/fuerte_workspace/pcl_ros_feature_matching/src/feature_matching.cpp:4:
  /home/sai/fuerte_workspace/perception_pcl_new/pcl16/include/pcl-1.6/pcl16/common/eigen.h:84:27: fatal error: Eigen/StdVector: No such file or directory
  compilation terminated.


Solution 2:

include_directories(/usr/include/eigen3)

Error 3:

 Linking CXX executable ../bin/feature_matching
  /usr/bin/ld: CMakeFiles/feature_matching.dir/src/feature_matching.o: undefined reference to symbol 'vtkAppendPolyData::New()'
  /usr/bin/ld: note: 'vtkAppendPolyData::New()' is defined in DSO /usr/lib/libvtkGraphics.so.5.8 so try adding it to the linker command line
  /usr/lib/libvtkGraphics.so.5.8: could not read symbols: Invalid operation

Solution 3:

target_link_libraries(feature_matching ${PCL_LIBRARIES} libvtkCommon.so libvtkFiltering.so libvtkRendering.so libvtkGraphics.so)

No comments:

Post a Comment