After installing the ROS noetic on Ubuntu, my understanding is that the implementation of header files, that is the .cpp files should be copied in a directory [..]
Do you mean you expect the source code (which I believe is what you are referring to by "implementation of header files") should be part of the set of files that gets installed by apt
?
If so, that's not correct.
apt
only installs binary artefacts such as libraries (.so
) and binaries (they typically don't have an extension on Linux, but are the executables of nodes and utilities/tools). Same for yum
and dnf
.
The libraries, together with the headers, are sufficient to be able to write and build new ROS applications, as the compiler needs the headers (to know which functions, classes etc exist) and the linker needs the libraries (to have access to the executable code making up the implementation of the functionality "promised" by the headers).
If you were to install (or build) ROS from source, then you would have both the headers and the sources (ie: .cpp
). But even then the .cpp
files do not get installed. They are only part of the source distribution of packages.