You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Mary Kohl <ko...@metsci.com> on 2011/04/13 22:42:25 UTC

ActiveMQ-CPP 3.3.0 Compiler error C2487 in VS 2008

I downloaded the source for ActiveMQ-CPP v 3.3.0 and tried to build using VS
2008 with the ReleaseDLL configuration.
It threw the C2487 error with the following description:

"You can declare a whole class, or certain members of a non-DLL interface
class, with DLL interface. You cannot declare a class with DLL interface and
then declare a member of that class with DLL interface."

The offending class is PrimitiveList with the declaration:

    class AMQCPP_API PrimitiveList : public decaf::util::LinkedList {
...

I think it is being caused by the PrimitiveValueNode declaration:

   class AMQCPP_API PrimitiveValueNode {
...

AMQCPP_API is defined as
 #define AMQCPP_API __declspec(dllexport)

If I remove the AMQCPP_API from the PrimitiveList declaration, the library
and dll build without error, but this means that PrimitiveList will not have
an external interface...not sure if this is desired behavior.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-3-3-0-Compiler-error-C2487-in-VS-2008-tp3448187p3448187.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: ActiveMQ-CPP 3.3.0 Compiler error C2487 in VS 2008

Posted by Timothy Bish <ta...@gmail.com>.
On Wed, 2011-04-13 at 13:42 -0700, Mary Kohl wrote:
> I downloaded the source for ActiveMQ-CPP v 3.3.0 and tried to build using VS
> 2008 with the ReleaseDLL configuration.
> It threw the C2487 error with the following description:
> 
> "You can declare a whole class, or certain members of a non-DLL interface
> class, with DLL interface. You cannot declare a class with DLL interface and
> then declare a member of that class with DLL interface."
> 
> The offending class is PrimitiveList with the declaration:
> 
>     class AMQCPP_API PrimitiveList : public decaf::util::LinkedList {
> ...
> 
> I think it is being caused by the PrimitiveValueNode declaration:
> 
>    class AMQCPP_API PrimitiveValueNode {
> ...
> 
> AMQCPP_API is defined as
>  #define AMQCPP_API __declspec(dllexport)
> 
> If I remove the AMQCPP_API from the PrimitiveList declaration, the library
> and dll build without error, but this means that PrimitiveList will not have
> an external interface...not sure if this is desired behavior.
> 
> 

You'll need to use the static libs for now, the DLL versions of the
library may not be usable for awhile until I figure out a way to make
them build correctly.

Regards


-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/

Connect at CamelOne May 24-26

The Open Source Integration Conference