HP eld Manual page 218

Table of Contents

Advertisement

Output Listings and Error Handling
Cause. Each of the two files mentioned in the message defined procedures of the
same name, as shown in the message. There are procedures that are specially
created by the C++ compiler, where the compiler marks them to say that duplicates are
okay, but at least one of the copies of this procedure was not so marked. Also, you did
not specify the -allow_duplicate_procs option. So, the duplicates are not allowed.
Effect. Fatal error (eld immediately stops without creating an output file).
Recovery. Did you really intend to define procedures with the same name in each of
these two files, and have both definitions visible across separate compilations? If not,
change the name of one of them, or change the declaration of one of them so that it is
only visible within its own compilation. If you really did intend to do this, you can use
the -allow_multiple_procs option to tell eld it is okay. In that case, eld will pick one
copy to use, so you must be sure that is the one you really want to use. If one copy of
the procedure has the resident attribute, eld will pick that one. Otherwise, eld will
pick the first one it sees, so you can affect that by the order in which you specify the
input object files on the command line. If the procedures were created by the C++
compiler, but not marked to say that duplicates are okay, it could be that you need to
write your C++ code differently or use different compiler options. The details of the
C++ rules are beyond the scope of this manual.
1597 Illegal duplicate definition of the initialized data
item <symbol name> in C and/or C++, occurring in <filename>
and <filename>.
Cause. Each of the two files mentioned in the message defined data items of the
same name, as shown in the message, and each of these files was written in C or
C++, and in each case the compiler called it an "initialized" data item. As a rule, it is
illegal in C or C++ to have duplicate initialized data items. However, there also are
data items that are specially created by the C++ compiler, where the compiler marks
them to say that duplicates are okay, but at least one of the copies of this data item
was not so marked. So, the duplicates are not allowed.
Effect. Fatal error (eld immediately stops without creating an output file).
Recovery. Did you really intend to define data items with the same name in each of
these two files, and have both definitions visible across separate compilations? If not,
change the name of one of them, or change the declaration of one of them so that it is
only visible within its own compilation. If you are using the same data item in more
than one place, only one of those places needs to be a definition, and the other places
can just be external references to that definition. Review the rules for what makes a
declaration a definition, depending on the source language that you are using,
because the rules are different for each language. If you really do intend to have two
definitions of this data item, visible across separate compilations, and the languages
involved are C or C++, then at most one copy of the data item is allowed to be
initialized. In C++, data items are always initialized, but in C that is not necessarily
true. In any case, that also is something that involves the rules of the language.
Modify your source code to get past these rules. Or, it also is possible that the data
eld Manual—527255-009
6-108
Error Messages

Advertisement

Table of Contents
loading

Table of Contents