Error runnig example openni_viewer_simple.cpp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error runnig example openni_viewer_simple.cpp

José Gouveia
Hello

I'm trying to run the PCL example of visualization tools , openni_viewer_simple.cpp and it keeps giving me this error:

Linking CXX executable kinect_viewer_simple
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libpcl_visualization.so: undefined reference to `__cxa_pure_virtual@libmysqlclient_16'
collect2: ld returned 1 exit status

I'm using a Kinect as  the OpenNI camera.
I don't know if it is due to the CMakeLists.txt file. The one that i use is:

----------CMakeLists.txt--------------------

cmake_minimum_required(VERSION 2.8)
project(KINECT_PCL)
list(APPEND CMAKE_MODULE_PATH ${KINECT_PCL_SOURCE_DIR})
find_package(PCL 1.0 REQUIRED)
find_package(PCL 1.0 COMPONENTS registration visualization)

if(PCL_FOUND)
    include_directories(${PCL_INCLUDES})
    set(LIBS ${LIBS} ${PCL_LIBRARIES})
    set(LIBS_MAP_PCL "PCL")
    set(LIBS_MAP_PCL_COMPONENTS registration visualization)
endif(PCL_FOUND)

include(FindOpenNI)
find_package (VTK)
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${OPENNI_INCLUDE_DIRS})
add_executable(openni_viewer_simple openni_viewer_simple.cpp)
target_link_libraries(openni_viewer_simple ${PCL_LIBRARIES})
target_link_libraries(openni_viewer_simple ${OPENNI_LIBRARIES})

------------------------------------------------------

Anyone can help me?

Best Regards
Jose Gouveia


_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Error runnig example openni_viewer_simple.cpp

Jochen Sprickerhof
Administrator
* José Gouveia <[hidden email]> [2011-05-19 19:13]:
>
> Hello

Hello José,

> I'm trying to run the PCL example of visualization tools , openni_viewer_simple.cpp and it keeps giving me this error:
>
> Linking CXX executable kinect_viewer_simple
> /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libpcl_visualization.so: undefined reference to `__cxa_pure_virtual@libmysqlclient_16'
> collect2: ld returned 1 exit status

that seems to be a problem with VTK (it depends on libmysqlclient which
should provide this symbol. Which operating system do you use? Did you
compile the PCL and or VTK by yourself?

> I'm using a Kinect as  the OpenNI camera.

there should be no problem with that.

> I don't know if it is due to the CMakeLists.txt file. The one that i use is:
>
> ----------CMakeLists.txt--------------------
>
> cmake_minimum_required(VERSION 2.8)
> project(KINECT_PCL)
> list(APPEND CMAKE_MODULE_PATH ${KINECT_PCL_SOURCE_DIR})
> find_package(PCL 1.0 REQUIRED)
> find_package(PCL 1.0 COMPONENTS registration visualization)
>
> if(PCL_FOUND)
>     include_directories(${PCL_INCLUDES})
>     set(LIBS ${LIBS} ${PCL_LIBRARIES})
>     set(LIBS_MAP_PCL "PCL")
>     set(LIBS_MAP_PCL_COMPONENTS registration visualization)
> endif(PCL_FOUND)
>
> include(FindOpenNI)
> find_package (VTK)
> include_directories(${PCL_INCLUDE_DIRS})
> include_directories(${OPENNI_INCLUDE_DIRS})
> add_executable(openni_viewer_simple openni_viewer_simple.cpp)
> target_link_libraries(openni_viewer_simple ${PCL_LIBRARIES})
> target_link_libraries(openni_viewer_simple ${OPENNI_LIBRARIES})
>
> ------------------------------------------------------

Using the provided Ubuntu packages on the website I can build it using
this CMakeLists.txt:

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(KINECT_PCL)
find_package(PCL 1.0 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
add_executable(openni_viewer_simple openni_viewer_simple.cpp)
target_link_libraries(openni_viewer_simple ${PCL_COMMON_LIBRARY} ${PCL_IO_LIBRARY} ${PCL_VISUALIZATION_LIBRARY})

> Anyone can help me?
>
> Best Regards
> Jose Gouveia

Cheers,

Jochen
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users