activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anju_singh <asi...@websense.com>
Subject Unable to compile actviemq-cpp-2.2 with VS2003
Date Fri, 25 Jul 2008 03:11:53 GMT

Hi,

Changed the version in 2005 vcproject file (vs2005-activemq.vcproj) to 7.10
and tried to compile it with VS2003.
Got errors that looked like (not posting all, just a few to keep the post
readable)
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
..\src\main\activemq\connector\ConnectorException.h(80) : error C2511:
'decaf::lang::Throwable
*activemq::connector::ConnectorException::clone(void)' : overloaded member
function not found in 'activemq::connector::ConnectorException'
        ..\src\main\activemq\connector\ConnectorException.h(29) : see
declaration of 'activemq::connector::ConnectorException'
..\src\main\activemq\connector\ConnectorException.h(80) : error C2511:
'activemq::exceptions::ActiveMQException
*activemq::connector::ConnectorException::clone(void)' : overloaded member
function not found in 'activemq::connector::ConnectorException'
        ..\src\main\activemq\connector\ConnectorException.h(29) : see
declaration of 'activemq::connector::ConnectorException'
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------

VS2005 compiler doesn't complain about this but VS2003 compiler does.

Investigated a bit to find out that the return type of virtual function
clone() is different in the inherited classes.  
For e.g:
----------------------------------------------------------------------------------------------------
for ConnectorException : public exceptions::ActiveMQException

        virtual ConnectorException* clone() const{
            return new ConnectorException( *this );
        }

----------------------------------------------------------------------------------------------------
Return type above is ConnectorException*

but the base class has following definition:
----------------------------------------------------------------------------------------------------
virtual ActiveMQException* clone() const;
----------------------------------------------------------------------------------------------------
Return type above is ActiveMQException*

I feel this is not right. Cloning should return the base type.
Moreover VS2003 compiler is pretty unhappy about it.

Please let me know what you guys think about this. Meanwhile I have changed
it in my activemq-cpp distribution to cheer up the compiler.

Thanks,
Anju



-- 
View this message in context: http://www.nabble.com/Unable-to-compile-actviemq-cpp-2.2-with-VS2003-tp18644453p18644453.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message