Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 69

Problem using gtk with ROS

$
0
0
Hello everyone. My problem is when I try to use `catkin_make`. I have my `catkin_ws` in `/home/name-of-user/`, and inside of it has a `file.cpp`. This `file.cpp` has an `#include ` in order to make a GUI with gtk. The `gtk.h` path is `/usr/include/gtk-2.0/gtk/`. And here is the problem: When I use `catkin_make` it shows this error: [ 75%] /home/name-of-user/catkin_ws/src/package/src/file.cpp:1:21: fatal error: gtk/gtk.h: No such file or directory #include ^ compilation terminated. make[2]: *** [package/CMakeFiles/file.dir/src/file.cpp.o] Error 1 make[1]: *** [package/CMakeFiles/package.dir/all] Error 2 ... make: *** [all] Error 2 Invoking "make -j2 -l2" failed Does anyone know how to solve this problem? I think maybe I have to write something in `CMakeLists.txt`, but I don't know what. Thank you in advance. EDIT: Here is the CMakeList.txt that I think I have to modify... cmake_minimum_required(VERSION 2.8.3) project(mov_autom) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS geometry_msgs kobuki_safety_controller roscpp turtlebot_bringup yocs_velocity_smoother ) ## Specify additional locations of header files ## Your package locations should be listed before other locations # include_directories(include) include_directories( ${catkin_INCLUDE_DIRS} ) include_directories(include ${catkin_INCLUDE_DIRS}) add_executable(randommov src/randommov.cpp) target_link_libraries(randommov ${catkin_LIBRARIES}) add_dependencies(randommov ${catkin_EXPORTED_TARGETS}) add_executable(randomlaser src/randomlaser.cpp) target_link_libraries(randomlaser ${catkin_LIBRARIES}) add_dependencies(randomlaser ${catkin_EXPORTED_TARGETS}) add_executable(listenermov src/listenermov.cpp) target_link_libraries(listenermov ${catkin_LIBRARIES}) add_dependencies(listenermov ${catkin_EXPORTED_TARGETS}) add_executable(interfaz_mejorada src/interfaz_mejorada.cpp) target_link_libraries(interfaz_mejorada ${catkin_LIBRARIES}) add_dependencies(interfaz_mejorada ${catkin_EXPORTED_TARGETS})

Viewing all articles
Browse latest Browse all 69

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>