Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

how to identify a C program used which C library files

 
SOLVED
Go to solution
Liu Tina
Occasional Advisor

how to identify a C program used which C library files

an customer will upgrade their system software. They asked: how to identify a C program used which C library files.

Thanks for your great help!
Best Regards,
Tina
8 REPLIES 8
John Gillings
Honored Contributor

Re: how to identify a C program used which C library files

Tina,

I'm not sure I understand your question.

By "C library files" do you mean run-time libraries, or compile time include files (".h")?

There are various code management utilities that can keep track of dependence trees. Other than using something like that, you may be able to get some of what you need by searching source code for "#include" directives.

>"customer will upgrade their system
>software"

If, by that, you mean they're going to upgrade OpenVMS, then this may be a non-issue. OpenVMS engineering go to fanatical lengths to preserve binary upwards compatibility. You should be able to upgrade the operating system without touching your applications.

If none of the above makes sense, please restate your question. What is the real problem you're trying to solve?
A crucible of informative mistakes
Liu Tina
Occasional Advisor

Re: how to identify a C program used which C library files

John,

Thanks for your Help!

The customer asked how to identify an C program used which C run-time libraries files and used which compile time include files (".h")under VMS.

And the other question is the customer application systems will be upgrade from V8.3 to VMS V8.3-1H1. The customer hope all of their programes were wrote by C could be running stable without re-comppile under VMS V8.3-1H1. Could you conform this?

Thanks for your great help!
Best Regards,
Tina


Joseph Huber_1
Honored Contributor
Solution

Re: how to identify a C program used which C library files

I don't know which code management (like VMS DECset) has tools to list use of header files,
but one possibility in VMS is the use of MMS/GENERATE:
MMS/GENERATE src1,src2,...
will list for each srcn file the dependencies like

 1]MMS$OLB.OLB(TERMIOS_VMS=TERMIOS_VMS.OBJ) depends_on -
TERMIOS_VMS.C - ,ALPHA$LIBRARY:DECC$RTLDEF.TLB(DESCRIP=DESCRIP.H) - ,ALPHA$LIBRARY:DECC$RTLDEF.TLB(STDLIB=STDLIB.H) -
 1] ,ALPHA$LIBRARY:SYS$STARLET_C.TLB(TTDEF=TTDEF.H) -
,SYS$LIBRARY:TERMIOS.H -
Â
Together with some filter script or a simple search would get the list of included header files and their locations.

Now the header files say nothing about the libraries (object or shareable) to resolve the symbols referenced in the headers like the standard ones (CRTL,FORRTL,starlet,...).
To know which libraries are referenced, You need to LINK/MAP/CROSS. At the beginning of the .MAP file there is a list of all object modules,libraries, and shared images linked.

http://www.mpp.mpg.de/~huber
Liu Tina
Occasional Advisor

Re: how to identify a C program used which C library files

Joseph,

Thanks for your help!

For you said: "To know which libraries are referenced, You need to LINK/MAP/CROSS. At the beginning of the .MAP file there is a list of all object modules,libraries, and shared images linked".

For these huge C programs come from vender several years ago. If there is any way to find which libraries are referenced at VMS?

Thanks for your help again!
Tina
Joseph Huber_1
Honored Contributor

Re: how to identify a C program used which C library files

If You are making executables, then the above mentioned .MAP output files contain the list.

If You have an executable, and want to know which libraries are referenced, then do a
ANALYZE/IMAGE name.exe
But analuze/image only can list the shared libraries (sys$share:.EXE) referenced, not the statically linked libraries (.OLB, object libraries). The executable bears no info about where object-modules came from.

http://www.mpp.mpg.de/~huber