Changing system, new problems gtk.h not found.
I'm trying to compile one file, that compiles fine in hydro, and gtk 2.0, but now the system as been upgraded to indigo, the file seems to compile but doesn't find gtk.h, I have gtk2.0 and gtk3.0 on my system, and I already compiled with gtk 2.0, no problems. My problem seems to be the catkin files. Can anyone give me a hand, pls.
CMakefile.txt
cmake_minimum_required(VERSION 2.8.3)
project(myVideoImageSubscriber)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
cv_bridge
image_transport
sensor_msgs
)
find_package(PkgConfig REQUIRED)
find_package(OpenCV)
pkg_check_modules(gtk REQUIRED gtk+-2.0)
pkg_check_modules(OpenCV REQUIRED opencv)
catkin_package(
CATKIN_DEPENDS roscpp std_msgs
)
include_directories(
${catkin_INCLUDE_DIRS}
${Bost_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${OpenCV_CFLAGS}
${GTK_INCLUDE_DIRS}
${GTK_CFLAGS}
)
add_executable(myvideoimagesubscriber src/myVideoImageSubscriber.cpp)
add_dependencies(myvideoimagesubscriber cv_bridge roscpp std_msgs image_transport sensor_msgs)
target_link_libraries(myvideoimagesubscriber
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OpenCV_LIBRARIES}
${GTK_LIBRARIES}
)
Thank's in advance.
Doesn't
pkg_check_modules(..)
store the contents of the.pc
file it parses in the variable named by the first argument to it? So in your casegtk
? CMake is case-sensitive, so I would expect all yourGTK_*
references later on to refer to non-existent variables then ..Also: when posting
CMakeLists.txt
, please remove all the boilerplate comments from them (lines starting with#
).Finally: can you check
GTK_INCLUDE_DIRS
actually contains anything? Add something liketo your
CMakeLists.txt
.