ITEM: Z6335L

C++ link-step error 0711-317 when using templates


   Env:  AIX 4.1.X

   Desc:  Customer is trying to compile a template class with
          C++ (xlC) and is encountering compiler-link-step 
          errors 0711-317.  Basically this is an unresolved 
          symbol error.  

   Action:  The customer was not including his template function
            implementation file in the source file.  

            For example:  If there is a template class declared in the
            foo.h header file, and its implementation is in the foo.c 
            (lower case c is standard with templates) source file, 
            the user should include both the header and the source 
            file in the final program source file.

            \#include "foo.h"
            \#include "foo.c"

            If the class template is completely in-line, this is
            not neccessary--there not being a separate implementation
            file.

            The customer then had forgotten to implement a few of
            his template functions.  This caused further unresolved
            symbol errors.  He implemented the functions (by putting
            matched braces in the header file to begin with) and
            the errors went away.


Support Line: C++ link-step error 0711-317 when using templates ITEM: Z6335L
Dated: September 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:33
Comments or suggestions? Contact us