### Link or Bind Error Indicating istdops.h

#### Effect

You are using a collection class with a key, and you get an error message during the link or bind step indicating a problem in istdops.h (Note: the errors you encounter may not be exactly the same as the following):

The message text for OS/2 is:

    istdops.h(176): (E) EDC3013: "key" function is undefined.

The message text for AIX is:

     ":/usr/lpp/xlC/include/istdops.h", line 176:
     1540-3013:
       (S) "key" is undefined.

The message text for Solaris is:

    "/.../.../include/istdops.h", line 176:
      (S) "key" is undefined.

#### Reason

You are using a collection class that requires the element class to provide a key and you chose to use the method of using a global key function. You are using collection class methods in a source file but the header file with the same name as the source file does not contain a declaration (prototype) of the global key function.

While compiling the source file, which uses methods of the collection class, the compiler has created or modified a temporary source file in the tempinc directory. During the link or bind step, bind step, this source file is compiled to resolve references to template code. The error message you encounter refers to this compilation. The source file in the tempinc directory contains include directives for the collection class template code. It also contains include directives for a header file of the same name as the source file that uses the collection class methods. The template code in istdops.h requires that the global key function be known at compilation time. The only file that is included at this time is the header file with the same name as your source file. The problem is that the source file is not included at this time, so a definition or declaration of the global key function in this file is not recognized by the compiler.

#### Solution

You must declare the global key function in the header file with the same name as the source file that uses the collection class methods. The definition of the global key function should be in the source file. If you are not sure which header file is meant by the message, look in the source file found in the tempinc directory.

Introduction to the Collection Classes
Overall Implementation Structure
Element Functions and Key-Type Functions

Implementing Element- and Key-Type Functionality
Defining Member Functions of the Element Object Type
Defining Separate Global Functions
Using or Defining an Element Operation Class
Memory Management with Element Operation Classes
Possible Implementation Paths
Choosing One of the Provided Implementation Variants
Instantiating the Collection Classes