Dependencies of ExecutablesThis note shows you how to use standard Unix tools to list dependencies of executables on the NAG Fortran or SMP Library. In particular this note looks at how to find NAG Fortran or SMP Library dependencies in static linked executables. Although the techniques described below refer specifically to the NAG Fortran Library, the expressions may be adapted to find other NAG library dependencies. The Tools1. nmThe standard Unix tool nm prints the name list of an object file or executable. This produces a verbose list of the symbol table of the object or executable file. 2. grepWhat is then needed is a tool to search for NAG Library names amongst the verbose output of nm. The pattern matching tool grep can do this for us. The Unix CommandIf our executable program is called a.out, the Unix command to search for NAG Library dependencies is:
The above concepts were tested on a Sun workstation running Solaris, but most Unix systems will have similar facilities, and produced the following output
|
© Numerical Algorithms Group
Visit NAG on the web at:
www.nag.co.uk (Europe and ROW)
www.nag.com (North America)
www.nag-j.co.jp (Japan)
http://www.nag.com/numeric/FL/FL_dependency.asp