LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   file version numbers (https://www.linuxquestions.org/questions/programming-9/file-version-numbers-16048/)

tjones11 03-11-2002 06:57 PM

file version numbers
 
I am new to programming in linux but come from a visual c++ MS background. In windows it is very easy to get the version numbers of dll and other executables through system calls. I need to be able to do the same thing in linux for all the system libraries. Does anyone know of a way to get at these programatically?

lavelle 03-15-2002 10:11 AM

the what command
 
In the old days there was a what command, and just a few minutes ago I noticed that my RH7.2 dist does not have this command. A few years ago I noticed that most programmers where not aware of it. If your machine has a what command just run it over your favorite .o .a .so* or executable and you should see version numbers of the input files from the RCS tags.

I'm thinking people don't do this anymore. I guess it is eaiser to 'cover your tracks' if people don't do this.

One quick note, the use for the what command was fairly specific and you may be trying to do something the Microsoft way and need to look at how you do things in the Unix/Linux way. For example shared libraries have major and minor numbers so you don't run into the .dll hell of two apps needing incompatable versions of the same library. Package file in a RedHat are managed by rpm.

isajera 03-15-2002 12:51 PM

i'm not really sure that's the issue - i think the difference between how version/compatibilty issues are handled in windows versus *nix is the problem... for an elf program, version requirements are handled almost exclusively by the configure script in pre-compile. i'm pretty sure that any runtime checks are package-specific.


All times are GMT -5. The time now is 06:19 PM.