giacomodabisias / libfreenect2pclgrabber

a grabber for the kinect2 which returns a registered pcl point cloud
71 stars 33 forks source link

Undefined reference to libfreenect2 #23

Closed pallavbakshi closed 7 years ago

pallavbakshi commented 7 years ago
CMakeFiles/Kinect2Grabber.dir/test.cpp.o: In function `K2G::updateCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >)':
test.cpp:(.text._ZN3K2G11updateCloudEN5boost10shared_ptrIN3pcl10PointCloudINS2_11PointXYZRGBEEEEE[_ZN3K2G11updateCloudEN5boost10shared_ptrIN3pcl10PointCloudINS2_11PointXYZRGBEEEEE]+0x42): undefined reference to `libfreenect2::SyncMultiFrameListener::waitForNewFrame(std::map<libfreenect2::Frame::Type, libfreenect2::Frame*, std::less<libfreenect2::Frame::Type>, std::allocator<std::pair<libfreenect2::Frame::Type const, libfreenect2::Frame*> > >&)'
test.cpp:(.text._ZN3K2G11updateCloudEN5boost10shared_ptrIN3pcl10PointCloudINS2_11PointXYZRGBEEEEE[_ZN3K2G11updateCloudEN5boost10shared_ptrIN3pcl10PointCloudINS2_11PointXYZRGBEEEEE]+0x152): undefined reference to `libfreenect2::Registration::apply(libfreenect2::Frame const*, libfreenect2::Frame const*, libfreenect2::Frame*, libfreenect2::Frame*, bool, libfreenect2::Frame*, int*) const'
test.cpp:(.text._ZN3K2G11updateCloudEN5boost10shared_ptrIN3pcl10PointCloudINS2_11PointXYZRGBEEEEE[_ZN3K2G11updateCloudEN5boost10shared_ptrIN3pcl10PointCloudINS2_11PointXYZRGBEEEEE]+0x339): undefined reference to `libfreenect2::SyncMultiFrameListener::release(std::map<libfreenect2::Frame::Type, libfreenect2::Frame*, std::less<libfreenect2::Frame::Type>, std::allocator<std::pair<libfreenect2::Frame::Type const, libfreenect2::Frame*> > >&)'
CMakeFiles/Kinect2Grabber.dir/test.cpp.o: In function `main':
test.cpp:(.text.startup+0xd3a): undefined reference to `libfreenect2::SyncMultiFrameListener::waitForNewFrame(std::map<libfreenect2::Frame::Type, libfreenect2::Frame*, std::less<libfreenect2::Frame::Type>, std::allocator<std::pair<libfreenect2::Frame::Type const, libfreenect2::Frame*> > >&)'
test.cpp:(.text.startup+0xe1d): undefined reference to `libfreenect2::Registration::apply(libfreenect2::Frame const*, libfreenect2::Frame const*, libfreenect2::Frame*, libfreenect2::Frame*, bool, libfreenect2::Frame*, int*) const'
test.cpp:(.text.startup+0x11d4): undefined reference to `libfreenect2::Registration::apply(libfreenect2::Frame const*, libfreenect2::Frame const*, libfreenect2::Frame*, libfreenect2::Frame*, bool, libfreenect2::Frame*, int*) const'
test.cpp:(.text.startup+0x13cf): undefined reference to `libfreenect2::SyncMultiFrameListener::release(std::map<libfreenect2::Frame::Type, libfreenect2::Frame*, std::less<libfreenect2::Frame::Type>, std::allocator<std::pair<libfreenect2::Frame::Type const, libfreenect2::Frame*> > >&)'
CMakeFiles/Kinect2Grabber.dir/test.cpp.o: In function `K2G::K2G(Processor, bool, std::string)':
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x2b): undefined reference to `libfreenect2::Freenect2::Freenect2(void*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x50): undefined reference to `libfreenect2::SyncMultiFrameListener::SyncMultiFrameListener(unsigned int)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xa1): undefined reference to `libfreenect2::Frame::Frame(unsigned long, unsigned long, unsigned long, unsigned char*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xca): undefined reference to `libfreenect2::Frame::Frame(unsigned long, unsigned long, unsigned long, unsigned char*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xf3): undefined reference to `libfreenect2::Frame::Frame(unsigned long, unsigned long, unsigned long, unsigned char*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x126): undefined reference to `libfreenect2::Freenect2::enumerateDevices()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x17c): undefined reference to `libfreenect2::OpenGLPacketPipeline::OpenGLPacketPipeline(void*, bool)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x18a): undefined reference to `libfreenect2::Freenect2::openDevice(std::string const&, libfreenect2::PacketPipeline const*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x1ad): undefined reference to `libfreenect2::Freenect2::getDefaultDeviceSerialNumber()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x21d): undefined reference to `libfreenect2::CpuPacketPipeline::CpuPacketPipeline()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x262): undefined reference to `libfreenect2::CpuPacketPipeline::CpuPacketPipeline()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x270): undefined reference to `libfreenect2::Freenect2::openDevice(std::string const&, libfreenect2::PacketPipeline const*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x2cd): undefined reference to `libfreenect2::getGlobalLogger()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0x3f7): undefined reference to `libfreenect2::Registration::Registration(libfreenect2::Freenect2Device::IrCameraParams, libfreenect2::Freenect2Device::ColorCameraParams)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xcdc): undefined reference to `libfreenect2::CpuPacketPipeline::CpuPacketPipeline()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xce7): undefined reference to `libfreenect2::Freenect2::openDefaultDevice(libfreenect2::PacketPipeline const*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xd00): undefined reference to `libfreenect2::OpenGLPacketPipeline::OpenGLPacketPipeline(void*, bool)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xd0b): undefined reference to `libfreenect2::Freenect2::openDefaultDevice(libfreenect2::PacketPipeline const*)'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xd24): undefined reference to `libfreenect2::CpuPacketPipeline::CpuPacketPipeline()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xe3f): undefined reference to `libfreenect2::Frame::~Frame()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xe4c): undefined reference to `libfreenect2::Frame::~Frame()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xe59): undefined reference to `libfreenect2::Frame::~Frame()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xe6e): undefined reference to `libfreenect2::SyncMultiFrameListener::~SyncMultiFrameListener()'
test.cpp:(.text._ZN3K2GC2E9ProcessorbSs[_ZN3K2GC5E9ProcessorbSs]+0xe76): undefined reference to `libfreenect2::Freenect2::~Freenect2()'
CMakeFiles/Kinect2Grabber.dir/test.cpp.o: In function `K2G::~K2G()':
test.cpp:(.text._ZN3K2GD2Ev[_ZN3K2GD5Ev]+0x25): undefined reference to `libfreenect2::Frame::~Frame()'
test.cpp:(.text._ZN3K2GD2Ev[_ZN3K2GD5Ev]+0x31): undefined reference to `libfreenect2::Frame::~Frame()'
test.cpp:(.text._ZN3K2GD2Ev[_ZN3K2GD5Ev]+0x3a): undefined reference to `libfreenect2::Frame::~Frame()'
test.cpp:(.text._ZN3K2GD2Ev[_ZN3K2GD5Ev]+0x50): undefined reference to `libfreenect2::SyncMultiFrameListener::~SyncMultiFrameListener()'
test.cpp:(.text._ZN3K2GD2Ev[_ZN3K2GD5Ev]+0x58): undefined reference to `libfreenect2::Freenect2::~Freenect2()'
collect2: error: ld returned 1 exit status
make[2]: *** [libfreenect2pclgrabber/Kinect2Grabber] Error 1
make[1]: *** [libfreenect2pclgrabber/CMakeFiles/Kinect2Grabber.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I created a new workspace and sourced it and cloned the repo and trying to catkin it now. But getting the above error. Do I need to install it in the libfreenect2 folder?

giacomodabisias commented 7 years ago

Did you install libfreenect2 into /usr/local? else the library won't be able to locate libfreenect2