Menu

#60 LNK2001 (unresolved external) error with operators << and >>

unspecified
closed
5
2012-09-27
2009-12-29
No

When using derived classes from TStreamable and the DECLARE_STREAMABLE and IMPLEMENT_STREAMABLE macros, the use of the stream operator >> or << on an object of such a derived class will result in link error LNK2001 (unresolved external symbol). Comparing the intermediate source code (the output of the preprocessor) resulting from compilation with the the original OWL libraries and the OWLNext libraries, it seems that OWLNext fails to include an implementation between curly brackets {} for operator<< and operator>>.

Discussion

  • Awin Sewgobind

    Awin Sewgobind - 2009-12-29

    Linking this file results in error LNK2001

     
  • Ognyan Chernokozhev

    The problem is caused by the missing directive BI_SUPPORT_TMPLFNC_FRIEND
    for Visual C++ 2005/2008/2010 in the file with compiler-specific constants.

    It will be added in the next update.

    Meanwhile, the problem can be solved by adding the line
    DECLARE_STREAMABLE_INLINES_I(TPolyline);
    after the line
    IMPLEMENT_STREAMABLE( TPolyline);

    and this will put the missing definitions.

    Jogy

     
  • Sebastian Ledesma

    Fixed in 6.30.5

     

Log in to post a comment.

MongoDB Logo MongoDB