HP eld Manual page 180

Table of Contents

Advertisement

Output Listings and Error Handling
Cobol source code, and can also be done by a link a link step that uses both the -e
and
options. The procedure so marked is the one where execution begins, when
-r
your object file is linked into a program. eld found two different procedures that were
each marked this way, as indicated in the message, and that is an error.
Effect. Error (The linker cannot do what was requested of it and will eventually stop,
but may continue for the purpose of detecting additional errors before stopping).
Recovery. If you were linking together two different pTAL object files, each of which
had a procedure with the MAIN attribute, are you sure you wanted to do that? It
usually makes sense to have one of these, if you are writing pTAL, but not more than
one. If you used a link with the -e and
procedure marked with the MAIN attribute, are you sure you wanted to do that? There
usually is no reason to do that. Did you include more than one copy of the special
object file that C and C++ include when creating a main program? If so, get rid of the
extra copies of that file. Did you include an object file created by pTAL, containing a
procedure with the MAIN attribute, when you were building a program whose main
language was C, C++, or Cobol? If so, don't do that. Or, if you really do want to link
together the object files you specified, despite the fact that they contain more than one
procedure with the MAIN attribute, you can do that with the -allow_mulitple_mains
option. In that case, eld will choose one of those procedures to be the one where
execution begins, so you would need to check that eld chose the one you wanted.
eld will choose the "first" one it sees, which you can control by changing the order of
object files on the command line, assuming the different procedures with the MAIN
attribute are in different object files.
1394 A procedure with the 'main' attribute cannot be included
in a DLL: <symbol name>.
Cause. The MAIN attribute is one of the attributes that can be assigned to a procedure
within an object file. For example, this can be done by using the appropriate syntax in
pTAL or Cobol source code. The procedure so marked is the one where execution
begins, when your object file is linked into a program. But you also specified, with an
option such as
program. That is considered an error.
Effect. Error (The linker cannot do what was requested of it and will eventually stop,
but may continue for the purpose of detecting additional errors before stopping).
Recovery. If your intention is to create a DLL, then you cannot have any procedure
with the MAIN attribute in your input object files. If you really want those object files in
your DLL, rebuild them so that they don't contain any procedures with the MAIN
attribute. Perhaps, when building your DLL, you incorrectly included the special object
file that C, C++, and Cobol include when creating a main program? If so, leave out
that object file. Or, if you want to build a program, rather than a DLL, don't specify an
option such as
, -shared, or -ul, that you wanted eld to build a DLL, not a
-dll
, -shared, or -ul, that tells eld to create a DLL.
-dll
eld Manual—527255-009
options to create an object file with a
-r
6-70
Error Messages

Advertisement

Table of Contents
loading

Table of Contents