libVLC|make: undefined reference to `libvlc_new' - c++

For a small project, I decided to use libvlc hence C/C++.
Using different references I somehow installed opencv and libvlc libraries and also wrote the following CMake file:
cmake_minimum_required(VERSION 3.10)
project(untitled1)
set(CMAKE_CXX_STANDARD 14)
SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake
${CMAKE_SOURCE_DIR}/config
${CMAKE_SOURCE_DIR}/config/platform
)
find_package(OpenCV REQUIRED)
find_package(LIBVLC REQUIRED)
file(GLOB SOURCE_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
)
add_executable(untitled1 ${SOURCE_FILES})
# If the package has been found, several variables will
# be set, you can find the full list with descriptions
# in the OpenCVConfig.cmake file.
# Print some message showing some of them
message(STATUS "OpenCV library status:")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " libraries: ${OpenCV_LIBS}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
if(CMAKE_VERSION VERSION_LESS "2.8.11")
# Add OpenCV headers location to your include paths
include_directories(${OpenCV_INCLUDE_DIRS})
endif()
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${LIBVLC_INCLUDE_DIRS})
set(LIBS ${LIBS} ${OpenCV_LIBS})
set(LIBS ${LIBS} ${LIBVLC_LIBRARIES} )
target_link_libraries( untitled1 ${LIBS})
But when I do, cmake and then make I get the following error:
[100%] Linking CXX executable untitled1
CMakeFiles/untitled1.dir/VLCReader.cpp.o: In function `VLCReader::VLCReader(char*)':
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:17: undefined reference to `libvlc_new'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:18: undefined reference to `libvlc_media_player_new'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:21: undefined reference to `libvlc_video_set_callbacks'
CMakeFiles/untitled1.dir/VLCReader.cpp.o: In function `VLCReader::~VLCReader()':
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:26: undefined reference to `libvlc_media_player_stop'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:27: undefined reference to `libvlc_media_player_release'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:28: undefined reference to `libvlc_release'
CMakeFiles/untitled1.dir/VLCReader.cpp.o: In function `VLCReader::start(int, int)':
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:33: undefined reference to `libvlc_media_player_pause'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:34: undefined reference to `libvlc_media_new_location'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:35: undefined reference to `libvlc_media_player_set_media'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:36: undefined reference to `libvlc_media_release'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:38: undefined reference to `libvlc_video_set_format'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:39: undefined reference to `libvlc_media_player_play'
CMakeFiles/untitled1.dir/VLCReader.cpp.o: In function `VLCReader::pause(bool)':
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:45: undefined reference to `libvlc_media_player_set_pause'
CMakeFiles/untitled1.dir/VLCReader.cpp.o: In function `VLCReader::updataSize()':
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:51: undefined reference to `libvlc_video_get_width'
/home/ravinder/CLionProjects/untitled1/VLCReader.cpp:52: undefined reference to `libvlc_video_get_height'
collect2: error: ld returned 1 exit status
CMakeFiles/untitled1.dir/build.make:166: recipe for target 'untitled1' failed
Please help me in going ahead. I am really new to C/C++ cmake based world.

Thanks #Tsyvarev and other people who pinted me in right direction.
My mistake in the CMake file is that I am using wrong variable names or say usng variables whihc are not defined.
LIBVLC_INCLUDE_DIRS to LIBVLC_INCLUDE_DIR
LIBVLC_LIBRARIES to LIBVLC_LIBRARY
Thanks all!

Related

Add ros cmake to an already existing cmake

I have a really big code with this cmake that works:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(MYPROJECT)
set (CMAKE_CXX_STANDARD 11)
find_package(PCL 1.7 REQUIRED)
if(DEFINED PCL_LIBRARIES)
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
endif()
FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (main src/main.cpp)
target_link_libraries (main ${PCL_LIBRARIES})
Now, I want to publish the results of this code to a ros topic. So I added this code to a ros workspace, and need to add ros stuff into the cmake. I changed the project name to the pkg name, and added to the cmake the find_package, include_directories and catkin_package, ending with this CMake:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(plc)
set (CMAKE_CXX_STANDARD 11)
find_package(PCL 1.7 REQUIRED)
if(DEFINED PCL_LIBRARIES)
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
endif()
find_package(catkin REQUIRED COMPONENTS
pcl_conversions
pcl_ros
roscpp
)
FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED)
include_directories(${catkin_INCLUDE_DIRS})
include_directories(${PCL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
catkin_package(CATKIN_DEPENDS roscpp pcl_ros pcl_conversions)
add_executable (main src/main.cpp)
target_link_libraries (main ${PCL_LIBRARIES})
also added this to the package.xml:
<build_depend>pcl_conversions</build_depend>
<build_depend>pcl_ros</build_depend>
<build_depend>roscpp</build_depend>
<build_export_depend>pcl_conversions</build_export_depend>
<build_export_depend>pcl_ros</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<exec_depend>pcl_conversions</exec_depend>
<exec_depend>pcl_ros</exec_depend>
<exec_depend>roscpp</exec_depend>
But I keep getting this errors, that according to google means that I made the CMake wrong.
usr/bin/ld: main.cpp:(.text+0x6bdc): undefined reference to `ros::Rate::Rate(double)'
/usr/bin/ld: main.cpp:(.text+0x6beb): undefined reference to `ros::NodeHandle::ok() const'
/usr/bin/ld: main.cpp:(.text+0x6c07): undefined reference to `ros::Time::now()'
/usr/bin/ld: main.cpp:(.text+0x6c3e): undefined reference to `ros::spinOnce()'
/usr/bin/ld: main.cpp:(.text+0x6c4d): undefined reference to `ros::Rate::sleep()'
/usr/bin/ld: main.cpp:(.text+0x6c5e): undefined reference to `ros::Publisher::~Publisher()'
/usr/bin/ld: main.cpp:(.text+0x6c6d): undefined reference to `ros::NodeHandle::~NodeHandle()'
/usr/bin/ld: main.cpp:(.text+0x6cfc): undefined reference to `ros::Publisher::~Publisher()'
/usr/bin/ld: main.cpp:(.text+0x6d0b): undefined reference to `ros::NodeHandle::~NodeHandle()'
Any idea how can I fix this? I'm clueless.
PS: I have another workspace with python ros that publishes/subscribes without problems, and this code was working perfectly before I added the ros part in cpp.
Make sure you also link agains the catkin specified libraries (${catkin_LIBRARIES}), because there the ROS libs are listed in:
target_link_libraries (main
${PCL_LIBRARIES})
${catkin_LIBRARIES}
)

Link SDL and Glut in CMake

I have a project (on linux) where I require glut and SDL.
I already managed to properly link glut, but I still cant get SDL linked.
My CMake file looks like this:
cmake_minimum_required(VERSION 3.7)
project(ObjLoader)
add_executable(testas main.cpp)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )
target_link_libraries(testas ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
When building the following exception is error occurs:
/opt/JetBrains/apps/CLion/ch-0/181.4668.70/bin/cmake/bin/cmake --build /home/void/Documents/Projects/ObjLoader/cmake-build-debug --target testas -- -j 2
[ 50%] Linking CXX executable testas
CMakeFiles/testas.dir/main.cpp.o: In function `main':
/home/user/Documents/Projects/ObjLoader/main.cpp:165: undefined reference to `SDL_Init'
/home/user/Documents/Projects/ObjLoader/main.cpp:166: undefined reference to `SDL_SetVideoMode'
/home/user/Documents/Projects/ObjLoader/main.cpp:173: undefined reference to `SDL_GetTicks'
/home/user/Documents/Projects/ObjLoader/main.cpp:174: undefined reference to `SDL_PollEvent'
/home/user/Documents/Projects/ObjLoader/main.cpp:184: undefined reference to `SDL_GL_SwapBuffers'
/home/user/Documents/Projects/ObjLoader/main.cpp:188: undefined reference to `SDL_GetTicks'
/home/user/Documents/Projects/ObjLoader/main.cpp:189: undefined reference to `SDL_GetTicks'
/home/user/Documents/Projects/ObjLoader/main.cpp:189: undefined reference to `SDL_Delay'
/home/user/Documents/Projects/ObjLoader/main.cpp:191: undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/testas.dir/build.make:100: testas] Error 1
make[2]: *** [CMakeFiles/Makefile2:68: CMakeFiles/testas.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/testas.dir/rule] Error 2
make: *** [Makefile:118: testas] Error 2
but the same problem persists,
When I try to link it as described here: How to use SDL2 and SDL_image with cmake
the same problem persists. How can I properly include and link SDL in the CMake file above?
My attempt was this:
cmake_minimum_required(VERSION 3.7)
project(ObjLoader)
add_executable(testas main.cpp)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(SDL2 REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
target_link_libraries(testas ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${SDL2_LIBRARIES})
Doesnt change anything, same problem.

Linking error in OpenGL using freeglut in CLion

So, I am using freeglut to try to do some openGL stuff, but I keep getting errors saying that references are undefined:
CMakeFiles\texture_mapping.dir/objects.a(TextureMapper.cpp.obj): In function `ZN13TextureMapper4initEv':
.../TextureMapper.cpp:20: undefined reference to `glClearColor#16'
.../TextureMapper.cpp:23: undefined reference to `glMatrixMode#4'
.../TextureMapper.cpp:24: undefined reference to `glLoadIdentity#0'
.../TextureMapper.cpp:25: undefined reference to `glOrtho#48'
CMakeFiles\texture_mapping.dir/objects.a(TextureMapper.cpp.obj): In function `ZN13TextureMapper7displayEv':
.../TextureMapper.cpp:45: undefined reference to `glClear#4'
...TextureMapper.cpp:48: undefined reference to `glColor3f#12'
...TextureMapper.cpp:49: undefined reference to `glBegin#4'
...TextureMapper.cpp:52: undefined reference to `glVertex3f#12'
...TextureMapper.cpp:53: undefined reference to `glVertex3f#12'
...TextureMapper.cpp:54: undefined reference to `glVertex3f#12'
...TextureMapper.cpp:55: undefined reference to `glVertex3f#12'
...TextureMapper.cpp:58: undefined reference to `glEnd#0'
...TextureMapper.cpp:61: undefined reference to `glFlush#0'
I am using MinGW with CLion to do this project. I thought that I got everything correctly. I moved the appropriate files into the include folder in MinGW, as well as the bin folder, and also the lib folder. Then, I have this in my CMakeLists.txt:
cmake_minimum_required(VERSION 3.3)
project(texture_mapping)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp TextureMapper.cpp TextureMapper.h Vertex.h ObjParser.cpp ObjParser.h)
add_executable(texture_mapping ${SOURCE_FILES})
target_link_libraries(texture_mapping libfreeglut.a libfreeglut_static.a)
The libraries I linked were the only library files that freeglut came with.
So, what am I missing? CLion doesn't show any errors before it is compiled. I can even go into the functions in the header files provided by freeglut. Why then, are these functions not defined in my program?
I have struggled with the same problem and solved it by appending following lines to CMakeLists.txt:
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
You did not actually link OpenGL to your project, so you get undefined references to OpenGL functions. Try to replace
target_link_libraries(texture_mapping libfreeglut.a libfreeglut_static.a)
with
target_link_libraries(texture_mapping libfreeglut.a libfreeglut_static.a GL)
I reproduced your issue with your CMakeLists.txt and the following program:
#include <GL/gl.h>
int main() {
glClear(GL_COLOR_BUFFER_BIT);
return 0;
}
and solved it with the above replacement. The solution automatically links GL library from my library path:
$ ls -1 /usr/lib64/libGL.*
/usr/lib64/libGL.la
/usr/lib64/libGL.so
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so.1.0.0
UPDATE
According to this, you have some variables to access your actual OpenGL libraries. For example, you may point to OpenGL library file(s) directly like this:
target_link_libraries(texture_mapping libfreeglut.a libfreeglut_static.a ${OPENGL_gl_LIBRARY})
Also you may add OpenGL library directory to the library search path (do it before target_link_libraries):
link_directories(${OPENGL_gl_LIBRARY})
Reordering the CMakeLists.txt helped me (<name> should be replaced accordingly):
cmake_minimum_required(VERSION 3.10)
project(<name>)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lGL -lGLU -lglut")
set(CMAKE_CXX_STANDARD 17)
add_executable(<name> main.cpp)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})

libtiff4 error with ROS

I am trying to compile a ROS-package from a friend with catkin under Ubuntu 14.04 and am getting the following error:
/usr/bin/ld: warning: libboost_system.so.1.49.0, needed by
//usr/local/MATLAB/R2014a/bin/glnxa64/libut.so, may conflict with libboost_system.so.1.54.0
//usr/local/lib/libcvd.so: undefined reference to `TIFFWriteEncodedStrip#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFReadRGBAImageOriented#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFWriteScanline#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFGetField#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFClose#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFClientOpen#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFGetFieldDefaulted#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFStripSize#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFSetField#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined reference to `FT_Face_GetCharVariantIndex'
//usr/local/lib/libcvd.so: undefined reference to `TIFFSetErrorHandler#LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFReadScanline#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined reference to `FT_Get_Advance'
collect2: error: ld returned 1 exit status
I have libcvd installed and also libtiff4-dev. Has anybody any idea, how to solve that issue?
Thanks a lot,
snow
EDIT: As suggest I include the CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(test)
set (test_VERSION "0.0.1")
find_package(OpenCV REQUIRED)
find_package(catkin REQUIRED COMPONENTS
test_core
cv_bridge
image_transport
roscpp
)
find_package(tracker)
set (CMAKE_CXX_FLAGS "-DNDEBUG -DNTIMING -DNRUN_UNIT_TESTS -g -O0 -std=c++11")
catkin_package(
INCLUDE_DIRS include
)
include_directories (include
${CMAKE_CURRENT_SOURCE_DIR}/include
${tracker_INCLUDE_DIRS}
${TRIANGULATION_INCLUDE_DIRS}
${OPENCV_INCLUDE_DIRS}
)
include_directories(/usr/local/MATLAB/R2014a/extern/include)
include_directories (SYSTEM
${catkin_INCLUDE_DIRS}
)
set (SOURCE
src/test/main.cc
src/test/rosbridge.cc
src/test/core.cc
)
add_executable (test ${SOURCE})
target_link_libraries(test
/lib/x86_64-linux-gnu/libssl.so.1.0.0
/lib/x86_64-linux-gnu/libcrypt.so.1
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/usr/local/MATLAB/R2014a/bin/glnxa64/libmx.so
/usr/local/MATLAB/R2014a/bin/glnxa64/libeng.so
/usr/local/MATLAB/R2014a/bin/glnxa64/libmat.so
/usr/local/MATLAB/R2014a/bin/glnxa64/libut.so
${OpenCV_LIBS}
${tracker_LIBRARIES}
cvd
${catkin_LIBRARIES}
${TRIANGULATION_LIBRARIES}
)
Just linking cvd seems to not work in your case.
CMake comes with the great find_package feature, though, so let's use it:
Add find_package(CVD REQUIRED) at the top of the file
Add ${CVD_INCLUDE_DIRS} to include_directories
Replace cvd in target_link_libraries with ${CVD_LIBRARIES}
This may not work immediately but throw an error like "FindCVD.cmake not found". This is a script that searches your file system for the actual location of this library on your system and stores the paths to the variables used above. Many libraries already bring such an file themselves, but if this is not the case you have to provide it manually. In most cases you don't have to write this file yourself, though, as there is usually a bunch of open source projects, that already created such a file, which you can reuse (for example here). Just google "FindCVD.cmake" to find them.
Once you have this file:
Create a new subdirectory called "cmake" in your project and store the file there.
Add set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) at the top of your CMakeLists.txt (before the find_package call!)
Now it should hopefully work :)
I fixed it!
You have to link against the libtiff lib in your lib folder like this:
target_link_libraries(test
.
.
.
/usr/lib/x86_64-linux-gnu/libtiff.so.5
.
.
.
)

linking to a custom library using cmake

I have two cmake files that build a directory and then try to compile an example that uses that library. The content of the first CMakeLists.txt file stored at the project root ${CMAKE_SOURCE_DIR} is:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project("lsd_point_pair")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
#Note: Eclipse automatically picks up include paths with this on!
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_CXX_FLAGS "-g")
find_package(PCL 1.7 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
set(BOOST_LIBS program_options)
find_package(Boost COMPONENTS ${BOOST_LIBS} REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
MESSAGE(" Boost_LIBRARIES: ${Boost_LIBRARIES}")
include_directories(${PROJECT_BINARY_DIR})
link_directories(${PROJECT_BINARY_DIR}/lib})
add_library(lsd_obj_rec_ransac lsd_obj_rec_ransac.cpp lsd_obj_rec_ransac.h lsd_point_pair_model_library.cpp lsd_point_pair_model_library.h ndim_voxel_structure.h orr_octree_cloud.h orr_octree_cloud.cpp)
target_link_libraries(lsd_obj_rec_ransac ${PCL_LIBRARIES} ${Boost_LIBRARIES})
######## subdirectories #########
add_subdirectory(examples)
In ${CMAKE_SOURCE_DIR}/examples I have the following CMakeLists.txt file:
add_executable(example_pcl_lsd_point_pair example_pcl_lsd_point_pair.cpp)
target_link_libraries(example_pcl_lsd_point_pair lsd_obj_rec_ransac ${Boost_LIBRARIES} ${PCL_LIBRARIES})
After successfully running cmake I run make and I get the linking errors:
CMakeFiles/example_pcl_lsd_point_pair.dir/example_pcl_lsd_point_pair.cpp.o: In function `~LSDObjRecRANSAC':
make[2]: Leaving directory `/media/Data/Documents/Grad/research/Projects/LSDPointPairs/qtcreator-build'
make[1]: Leaving directory `/media/Data/Documents/Grad/research/Projects/LSDPointPairs/qtcreator-build'
/home/mustafa/projects/LSDPointPairs/examples/../lsd_obj_rec_ransac.h:44: undefined reference to `pcl::recognition::ORROctreeCloud::~ORROctreeCloud()'
/home/mustafa/projects/LSDPointPairs/examples/../lsd_obj_rec_ransac.h:44: undefined reference to `pcl::recognition::ORROctreeCloud::~ORROctreeCloud()'
../lib/liblsd_obj_rec_ransac.a(lsd_obj_rec_ransac.cpp.o): In function `LSDObjRecRANSAC':
/home/mustafa/projects/LSDPointPairs/lsd_obj_rec_ransac.cpp:18: undefined reference to `pcl::recognition::LSDPointPairModelLibrary::LSDPointPairModelLibrary(float, float, float)'
/home/mustafa/projects/LSDPointPairs/lsd_obj_rec_ransac.cpp:18: undefined reference to `pcl::recognition::ORROctreeCloud::ORROctreeCloud()'
/home/mustafa/projects/LSDPointPairs/lsd_obj_rec_ransac.cpp:18: undefined reference to `pcl::recognition::ORROctreeCloud::~ORROctreeCloud()'
../lib/liblsd_obj_rec_ransac.a(lsd_point_pair_model_library.cpp.o): In function `LSDPointPairModel':
/home/mustafa/projects/LSDPointPairs/lsd_point_pair_model_library.h:36: undefined reference to `pcl::recognition::ORROctreeCloud::ORROctreeCloud()'
/home/mustafa/projects/LSDPointPairs/lsd_point_pair_model_library.h:36: undefined reference to `pcl::recognition::ORROctreeCloud::~ORROctreeCloud()'
../lib/liblsd_obj_rec_ransac.a(lsd_point_pair_model_library.cpp.o): In function `~LSDPointPairModel':
/home/mustafa/projects/LSDPointPairs/lsd_point_pair_model_library.h:27: undefined reference to `pcl::recognition::ORROctreeCloud::~ORROctreeCloud()'
/home/mustafa/projects/LSDPointPairs/lsd_point_pair_model_library.h:27: undefined reference to `pcl::recognition::ORROctreeCloud::~ORROctreeCloud()'
collect2: ld returned 1 exit status
make[2]: *** [bin/example_pcl_lsd_point_pair] Error 1
make[1]: *** [examples/CMakeFiles/example_pcl_lsd_point_pair.dir/all] Error 2
make: *** [all] Error 2
The library successfully gets built because I see the liblsd_obj_rec_ransac.a file gets generated. But the problem happens when trying to compile the example. What am I doing wrong?