You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Chuck Rolke (JIRA)" <ji...@apache.org> on 2011/09/12 20:49:09 UTC

[jira] [Assigned] (QPID-3478) Windows Visual Studio 2010 warning C4251 'needs to have dll interface' qpid::amqp_0_10::MapCodec::contentType

     [ https://issues.apache.org/jira/browse/QPID-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chuck Rolke reassigned QPID-3478:
---------------------------------

    Assignee: Chuck Rolke

> Windows Visual Studio 2010 warning C4251 'needs to have dll interface' qpid::amqp_0_10::MapCodec::contentType
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3478
>                 URL: https://issues.apache.org/jira/browse/QPID-3478
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker, C++ Client
>    Affects Versions: 0.12
>         Environment: Windows builds using Visual Studio 2010
>            Reporter: Chuck Rolke
>            Assignee: Chuck Rolke
>             Fix For: Future
>
>
> File cpp/include/qpid/amqp_0_10/Codecs.h has code to the effect of:
> class QPID_COMMON_EXTERN MapCodec
> {
>   public:
>     static const std::string contentType;
>   private:
> };
> VS2010 warns that exporting a std::string from a DLL may have unexpected consequences.
> One possible solution is from
> http://www.eggheadcafe.com/software/aspnet/30952961/a-solution-to-warning-c4251--class-needs-to-have-dllinterface.aspx
> 2. You can define a wrapper class that has no inline functions and defines all the potentially compiler-generated functions (default ctor, copy ctor, dtor, and assignment operator) and dllexport that.
> Other discussion of this issue:
> http://stackoverflow.com/questions/2132747/warning-c4251-when-building-a-dll-that-exports-a-class-containing-an-atlcstring

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org