Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to add all of source files that will build an executable to the add_executable command.

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

To create multiple executables, you just add multiple instances of that line:

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_two src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_three src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

Each add_executable is self-contained so it will only use the files you list to build the executable. So make sure you list all source files needed, even they are also used for a different executable. Your error message suggests that you are missing some necessary source files in the add_executable(test_imu_results ...) call.

You need to add all of source files that will build an executable to the add_executable command.

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

To create multiple executables, you just add multiple instances of that line:

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_two src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_three src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

Each add_executable is self-contained so it will only use the files you list to build the executable. So make sure you list all source files needed, even they are also used for a different executable. Your error message suggests that you are missing some necessary source files in the add_executable(test_imu_results ...) call.

You need to add all of source files that will build an executable to the add_executable command.

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

To create multiple executables, you just add multiple instances of that line:

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_two src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_three src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

Each add_executable is self-contained so it will only use the files you list to build the executable. So make sure you list all source files needed, even they are also used for a different executable. Also make sure you have the target_link_library(executable ${CATKIN_LIBRARIES}) for each executable.

You need to add all of source files that will build an executable to the add_executable command.

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

To create multiple executables, you just add multiple instances of that line:

## Declare a cpp executable
add_executable(executable_one src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_two src/source_one.cpp src/source_two.cpp ... src/source_n.cpp) 
add_executable(executable_three src/source_one.cpp src/source_two.cpp ... src/source_n.cpp)

Each add_executable is self-contained so it will only use the files you list to build the executable. So make sure you list all source files needed, even they are also used for a different executable. Also Also, make sure you have the target_link_library(executable ${CATKIN_LIBRARIES}) ${catkin_LIBRARIES}) for each executable.