You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Andrea Richards (JIRA)" <xe...@xml.apache.org> on 2009/03/02 19:04:56 UTC

[jira] Created: (XERCESC-1855) Export classes in a DLL drived from classes exported by Xerces causes linker errors

Export classes in a DLL drived from classes exported by Xerces causes linker errors
-----------------------------------------------------------------------------------

                 Key: XERCESC-1855
                 URL: https://issues.apache.org/jira/browse/XERCESC-1855
             Project: Xerces-C++
          Issue Type: Bug
          Components: DOM
    Affects Versions: 3.0.1
         Environment: Windows XP Visual Studio 2005
            Reporter: Andrea Richards
            Priority: Blocker


We currently have a DLL which exports a couple of classes derived from Xerces. These are ContentSpecHandler and DTDElementDecl. When I try to export these classes from our DLL I get numerous linker errors despite including the both the lib files (which contain the correct signatures) and setting up the solutions dependancies.  One example is shown below. I believe this to be a bug as it must be possible to derive a class from Xerces in a another DLL and then export it to be used by an EXE file, but this appears not to be the case. Do you have an answer or a working solution that will allow me to continue integration ? Thanks

Andrea



class LAD_EXPORT CXMLContentSpecNode : public ContentSpecNode
{

   public:
      CXMLContentSpecNode(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager)
         : ContentSpecNode(manager), m_iElementId(-1) {};

...

};

Linker error :
XMLInterface.obj : error LNK2001: unresolved external symbol "public: static class xercesc_3_0::MemoryManager * xercesc_3_0::XMLPlatformUtils::fgMemoryManager" (?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A)

Map file entry:
 0004:00030c7c       ?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A 10552c7c     PlatformUtils.obj







-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Closed: (XERCESC-1855) Export classes in a DLL drived from classes exported by Xerces causes linker errors

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni closed XERCESC-1855.
----------------------------------


> Export classes in a DLL drived from classes exported by Xerces causes linker errors
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESC-1855
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1855
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.0.1
>         Environment: Windows XP Visual Studio 2005
>            Reporter: Andrea Richards
>            Priority: Blocker
>
> We currently have a DLL which exports a couple of classes derived from Xerces. These are ContentSpecHandler and DTDElementDecl. When I try to export these classes from our DLL I get numerous linker errors despite including the both the lib files (which contain the correct signatures) and setting up the solutions dependancies.  One example is shown below. I believe this to be a bug as it must be possible to derive a class from Xerces in a another DLL and then export it to be used by an EXE file, but this appears not to be the case. Do you have an answer or a working solution that will allow me to continue integration ? Thanks
> Andrea
> class LAD_EXPORT CXMLContentSpecNode : public ContentSpecNode
> {
>    public:
>       CXMLContentSpecNode(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager)
>          : ContentSpecNode(manager), m_iElementId(-1) {};
> ...
> };
> Linker error :
> XMLInterface.obj : error LNK2001: unresolved external symbol "public: static class xercesc_3_0::MemoryManager * xercesc_3_0::XMLPlatformUtils::fgMemoryManager" (?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A)
> Map file entry:
>  0004:00030c7c       ?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A 10552c7c     PlatformUtils.obj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Resolved: (XERCESC-1855) Export classes in a DLL drived from classes exported by Xerces causes linker errors

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni resolved XERCESC-1855.
------------------------------------

    Resolution: Invalid

Please do not create Jira issues to ask questions.

There is no bug in Xerces with regard to exporting user-defined classes derived from Xerces-C classes.  Xalan-C does this with no problems.  Please make sure you are using the __declspec(dllexport) directive correctly and that you're linking with the appropriate DLL version of the Xerces-C library.

If you have more questions, please post a message to the user list with the linker errors and the specifics of your Visual Studio compiler code-generation and linker input settings.

> Export classes in a DLL drived from classes exported by Xerces causes linker errors
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESC-1855
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1855
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.0.1
>         Environment: Windows XP Visual Studio 2005
>            Reporter: Andrea Richards
>            Priority: Blocker
>
> We currently have a DLL which exports a couple of classes derived from Xerces. These are ContentSpecHandler and DTDElementDecl. When I try to export these classes from our DLL I get numerous linker errors despite including the both the lib files (which contain the correct signatures) and setting up the solutions dependancies.  One example is shown below. I believe this to be a bug as it must be possible to derive a class from Xerces in a another DLL and then export it to be used by an EXE file, but this appears not to be the case. Do you have an answer or a working solution that will allow me to continue integration ? Thanks
> Andrea
> class LAD_EXPORT CXMLContentSpecNode : public ContentSpecNode
> {
>    public:
>       CXMLContentSpecNode(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager)
>          : ContentSpecNode(manager), m_iElementId(-1) {};
> ...
> };
> Linker error :
> XMLInterface.obj : error LNK2001: unresolved external symbol "public: static class xercesc_3_0::MemoryManager * xercesc_3_0::XMLPlatformUtils::fgMemoryManager" (?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A)
> Map file entry:
>  0004:00030c7c       ?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A 10552c7c     PlatformUtils.obj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Updated: (XERCESC-1855) Export classes in a DLL drived from classes exported by Xerces causes linker errors

Posted by "Andrea Richards (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Richards updated XERCESC-1855:
-------------------------------------

    Component/s:     (was: DOM)
                 Build

> Export classes in a DLL drived from classes exported by Xerces causes linker errors
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESC-1855
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1855
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.0.1
>         Environment: Windows XP Visual Studio 2005
>            Reporter: Andrea Richards
>            Priority: Blocker
>
> We currently have a DLL which exports a couple of classes derived from Xerces. These are ContentSpecHandler and DTDElementDecl. When I try to export these classes from our DLL I get numerous linker errors despite including the both the lib files (which contain the correct signatures) and setting up the solutions dependancies.  One example is shown below. I believe this to be a bug as it must be possible to derive a class from Xerces in a another DLL and then export it to be used by an EXE file, but this appears not to be the case. Do you have an answer or a working solution that will allow me to continue integration ? Thanks
> Andrea
> class LAD_EXPORT CXMLContentSpecNode : public ContentSpecNode
> {
>    public:
>       CXMLContentSpecNode(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager)
>          : ContentSpecNode(manager), m_iElementId(-1) {};
> ...
> };
> Linker error :
> XMLInterface.obj : error LNK2001: unresolved external symbol "public: static class xercesc_3_0::MemoryManager * xercesc_3_0::XMLPlatformUtils::fgMemoryManager" (?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A)
> Map file entry:
>  0004:00030c7c       ?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PAVMemoryManager@2@A 10552c7c     PlatformUtils.obj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org