Developing Compaq COBOL Programs
1.2 Developing Programs on Tru64 UNIX
If the symbol is undefined, U appears in the column before the symbol name. Any
symbols with a U in their names can also be displayed by this use of
grep
.
1.2.3.2 Specifying Additional Object Libraries
You can control the libraries as follows:
•
To specify additional object library file names for
ld
to locate, use the
-l
string flag to define an additional object library for
ld
to search. Thus, each
occurrence of the
-l
string flag specifies an additional file name that is added
to the list of object libraries for
ld
to locate. The standard COBOL library file
names searched (shown in the form of the appropriate
-l
string flag) are:
-lcob
-lcurses
-lFutil
-lots2
-lots
-lisam
-lsort
-lexc
-lm
For instance, the file name of
-lcob
is
libcob
.
The following example specifies the additional library
libX
:
% cobol simtest.cob -lX
•
In addition to the standard directories in which
ld
tries to locate the library
file names, you can use the
-L
dir flag to specify another directory. The
-l
string flag and
-L
dir flag respectively adds an object library file name
(
-l
string) or directory path (
-L
dir) that
ld
uses to locate all specified library
files. The standard
ld
directories are searched before directories specified by
the
-L
dir flag.
The following example specifies the additional object library path
/usr/lib/mytest
:
% cobol
simtest.cob -L/usr/lib/mytest
•
You can indicate that
ld
should not search its list of standard directories at
all by specifying the
-L
flag. When you do so, you must specify all libraries
on the
cobol
command line in some form, including the directory for
cobol
standard libraries. To specify all libraries, you might use the
-L
flag in
combination with the
-L
dir flag on the same
cobol
command line.
•
You can specify the pathname and file name of an object library as you
would specify any file. Specifying each object library that resides in special
directories in this manner is an alternative to specifying the library using the
-l
string or
-L
dir flag. This method can reduce the amount of searching the
linker must do to locate all the needed object files.
In certain cases, you may need to specify the pathname and file name instead
of using the
-l
string or
-L
dir flags for the linker to resolve global symbols
with shared libraries.
When processing a C source file (
.c
suffix) using the
cobol
command, you may
need to specify the appropriate C libraries using the
-l
string flag.
1–20 Developing Compaq COBOL Programs
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......