error while using catkin_make In beginners tutorial

asked 2014-06-14 23:38:46 -0500

tejdeep gravatar image

updated 2014-06-15 01:21:36 -0500

I am doing the beginners tutorials (simple publisher and subscriber).

This is my copy of CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)

## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)

## Declare ROS messages and services
#add_message_files(FILES Num.msg)
#add_service_files(FILES AddTwoInts.srv)

## Generate added messages and services
#generate_messages(DEPENDENCIES std_msgs)

## Declare a catkin package

## Build talker and listener
include_directories(include ${catkin_INCLUDE_DIRS})

add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)

add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)

I then used catkin_make and got the following error:

CMake Error at beginner_tutorials/CMakeLists.txt:18 (include_directories):
  Syntax error in cmake code at


  when parsing string


  syntax error, unexpected $end, expecting }} (9)

-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
edit retag flag offensive close merge delete


Does any other package compile? Have you correctly sourced your workspace?

Wolf gravatar image Wolf  ( 2014-06-16 07:55:31 -0500 )edit

In line 18 of your CMakeLists.txt, what is it by the way? What statement or any file name there?

alfa_80 gravatar image alfa_80  ( 2014-06-16 08:18:15 -0500 )edit