error when i compile makefile

asked 2019-10-15 16:29:15 -0600

zahra gravatar image

After when i modify the cmakefile i get this error

-- +++ processing catkin package: 'my_first_awsome_pkg'
-- ==> add_subdirectory(my_first_awsome_pkg)
CMake Error: Error in cmake code at
/home/zora/tuto_catkin_ws/src/my_first_awsome_pkg/CMakeLists.txt:18:
Parse error.  Function missing ending ")".  End of file reached.
-- Configuring incomplete, errors occurred!
See also "/home/zora/tuto_catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/zora/tuto_catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
edit retag flag offensive close merge delete

Comments

Hi,

It will be better if you provide the chuck of code your are trying to compile. Looking at that report it seems that you have your CMakeLists file wrong formed. It looks like you missed a parenthesis in line 18 and the file is not parsed correctly.

Weasfas gravatar imageWeasfas ( 2019-10-16 04:30:59 -0600 )edit

okey sir this is my CMakefile i use the example of ros c++ ""Writing a Simple Service and Client (C++)"" link text

cmake_minimum_required(VERSION 2.8.3)
project(my_first_awsome_pkg)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
)
catkin_package(

include_directories(

  ${catkin_INCLUDE_DIRS}
)
add_executable(talker_node src/talker_node.cpp)
target_link_libraries(talker_node ${catkin_LIBRARIES})
zahra gravatar imagezahra ( 2019-10-16 04:53:05 -0600 )edit

Hi,

Yes. In line catkin_package( you missed a ).

Generally speaking that line is: catkin_package() or

catkin_package(
DEPENDS
 catkin_pgk_1
catkin_pkg_2
...
)
Weasfas gravatar imageWeasfas ( 2019-10-16 05:13:00 -0600 )edit

thanks sir

zahra gravatar imagezahra ( 2019-10-21 11:25:41 -0600 )edit