learning_tf CMake Error Melodic
Hi I'm following the learning_tf tutorial ( http://wiki.ros.org/tf/Tutorials/Writ... ) using Ubuntu 18.04 and ROS Melodic.
I have a problem when I use catkin_make, it seems that it cannot find my cpp file in my src folder. Althought i follwoed the instructions correctly.
CMake Error at learning_tf/CMakeLists.txt:203 (add_executable):
Cannot find source file:
turtle_tf_broadcaster.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: turtle_tf_broadcaster
CMake Error: Cannot determine link language for target "turtle_tf_broadcaster".
-- Generating done
-- Build files have been written to: /home/karl/tutorial_ws/build
Makefile:1104: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
Any idea ??? I feel it is just a basic compiling error but i just can't find the solution ...
Thank you
Is your
turtle_tf_broadcaster.cpp
file located in thesrc
sub directory of your package? If it is, then do you list the source file assrc/turtle_tf_broadcaster.cpp
inCMakeLists.txt
(note thesrc/
prefix there)?If not, that is where the problem is.
Thanks for the answer. I can't save a file with src/ in its name so i just deleted this part.
Ok i found the solution ! thank you for your help !
src
is a directory, not part of the filename.can you please tell us how you solved your problem?