Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-354

Exported classes with inlined virtual functions.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.6.0
    • None
    • SAX/SAX2
    • None
    • Operating System: All
      Platform: All
    • 6903

    Description

      Some SAX classes like SAX/ErrorHandler, looks like:

      class SAX_EXPORT ErrorHandler
      {
      public:
      ErrorHandler() {}
      virtual ~ErrorHandler() {}
      };

      When linking Xerces DLL to my program, my linker (CodeWarrior) gives multiple
      definied warning(s):
      ErrorHandler::~ErrorHandler is defined in the XERCES.DLL, and in application.

      Since the destructor is virtual, exported, inlined the linker is right.
      The descructor should no be inlined, or is should not be exported.

      Morover since all of the virtual functions has implementation, the compiler can
      generate a vtbl for it. So the vtbl is also defined twice.

      I think that the destructor's implementation should not be inlined.

      Regards,
      Miklos

      Attachments

        Activity

          People

            Unassigned Unassigned
            mfazekas@graphisoft.hu Miklós Fazekas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: