[ http://issues.apache.org/jira/browse/XERCESC-354?page=history ] David Bertoni resolved XERCESC-354: -----------------------------------
Assign To: (was: Xerces-C Developers Mailing List) Resolution: Invalid The C++ language standard specifies that inline functions have external linkage, so it is the responsibility of the compiler and linker to work to ensure that out-of-line copies are merged into a single one. As long as your environment does not report an error with duplicate symbols, the code should work fine. > Exported classes with inlined virtual functions. > ------------------------------------------------ > > Key: XERCESC-354 > URL: http://issues.apache.org/jira/browse/XERCESC-354 > Project: Xerces-C++ > Type: Bug > Components: SAX/SAX2 > Versions: 1.6.0 > Environment: Operating System: All > Platform: All > Reporter: Miklós Fazekas > > 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 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]