I need to obtain the information on the C-compiler used to build an installed program. I am guessing a rt or a lib can report that, but nothing concrete. Not that the program would be installed in /usr/...
or a similar place, and hence would not have access to the build directory to get the relevant info.
相关问题
- Multiple sockets for clients to connect to
- Is shmid returned by shmget() unique across proces
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- how to get running process information in java?
Well behaved programs should understand the
--version
argument.Packaged programs (i.e. those installed with
dpkg -i
orapt-get install
of a.deb
package on Debian, etc...) also know their package version and source.You might try to use
strings
on the binary executable. However, such meta-data (about the version of the C compiler used to build the program) might have been stripped (e.g. by thestrip
command).If you are developing the program (i.e. its C source code) and can change it, you might consider adding something like
in your
Makefile
(details could be wrong, but you get the idea)