AndreGilerson / rviz_vive_plugin

RVIZ Plugin for the HTC Vive
13 stars 7 forks source link

3.0 Build Instructions-----catkin_make error #3

Open stevensu1838 opened 6 years ago

stevensu1838 commented 6 years ago

H Sir, I get stuck at 3.0 Build Instructions. Can you please do me a favour? After I ran catkin_make, I got the following error:

CMake Error at rviz_vive_plugin/CMakeLists.txt:21 (find_package):
  By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SDL2", but
  CMake did not find one.

  Could not find a package configuration file provided by "SDL2" with any of
  the following names:

    SDL2Config.cmake
    sdl2-config.cmake

  Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
  "SDL2_DIR" to a directory containing one of the above files.  If "SDL2"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/home/ysu66/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ysu66/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

Can you please help me out? Thanks a lot.

AndreGilerson commented 6 years ago

Have you followed the setup tutorial? In step 2.1 you install the SDL2 library, which seem to be missing on your system. Try to run sudo apt-get install libsdl2-dev

ghost commented 6 years ago

If just installing that library doesn't solve your problem (like also in my case), look into this: https://brendanwhitfield.wordpress.com/2015/02/26/using-cmake-with-sdl2/ Perhaps it has to do with me still using Ubuntu 14.04, but I had to change the line 20 in CMakeLists.txt to point to a specific directory