Multiple definition of main error in catkin_make
What am I doing wrong. I checked this but the add_executables seem to be ok. This is my cmakeList.txt
If i only use the server and client example it error is the same. Did I mix something up?
[ 94%] Built target listener
Scanning dependencies of target add_two_ints_server
[100%] Building CXX object test_my_env/CMakeFiles/add_two_ints_server.dir/src/add_two_ints_server.cpp.o
Linking CXX shared library /home/baum/catkin_ws/devel/lib/libmy_test_lib.so
CMakeFiles/my_test_lib.dir/src/listener.cpp.o: In function `main':
listener.cpp:(.text+0x15c): multiple definition of `main'
CMakeFiles/my_test_lib.dir/src/talker.cpp.o:talker.cpp:(.text+0x0): first defined here
CMakeFiles/my_test_lib.dir/src/add_two_ints_server.cpp.o: In function `main':
add_two_ints_server.cpp:(.text+0x2b5): multiple definition of `main'
CMakeFiles/my_test_lib.dir/src/talker.cpp.o:talker.cpp:(.text+0x0): first defined here
CMakeFiles/my_test_lib.dir/src/add_two_ints_client.cpp.o: In function `main':
add_two_ints_client.cpp:(.text+0x0): multiple definition of `main'
CMakeFiles/my_test_lib.dir/src/talker.cpp.o:talker.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [/home/baum/catkin_ws/devel/lib/libmy_test_lib.so] Error 1
make[1]: *** [test_my_env/CMakeFiles/my_test_lib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....