activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmittal <nmit...@rblt.com>
Subject Re: CMS: Installed 3.0.1 but my existing code
Date Fri, 30 Oct 2009 16:41:51 GMT

I fixed the errors by adding...
#include <memory>
#include <activemq/library/ActiveMQCPP.h>

thanks
Nishant


nmittal wrote:
> 
> Hi Tim, as suggested, I added the lines but when I do a make I get the
> following errors... (the same code built fine with 2.2.5
> 
> $ make
> make: Warning: File `../Libraries/ActiveMQ/activemq.cpp' has modification
> time 7 s in the future
> g++ -g -ggdb -I. -I/usr/local/include/activemq-cpp-3.0.1
> -I/usr/local/apr/include/apr-1 -I/usr/local/include/boost -c -o
> ../Libraries/ActiveMQ/activemq.o ../Libraries/ActiveMQ/activemq.cpp
> ../Libraries/ActiveMQ/activemq.cpp: In member function ‘void
> clAMQ::connect()’:
> ../Libraries/ActiveMQ/activemq.cpp:6: error: ‘auto_ptr’ was not
> declared in this scope
> ../Libraries/ActiveMQ/activemq.cpp:6: error: expected primary-expression
> before ‘>’ token
> ../Libraries/ActiveMQ/activemq.cpp:7: error: ‘connectionFactory’ was
> not declared in this scope
> ../Libraries/ActiveMQ/activemq.cpp: In constructor
> ‘clAMQ::clAMQ(std::string&)’:
> ../Libraries/ActiveMQ/activemq.cpp:706: error: ‘activemq::library’ has
> not been declared
> ../Libraries/ActiveMQ/activemq.cpp: In member function ‘void
> clAMQ::cleanup()’:
> ../Libraries/ActiveMQ/activemq.cpp:773: error: ‘activemq::library’ has
> not been declared
> make: *** [../Libraries/ActiveMQ/activemq.o] Error 1
> 
> my header file has the following...
> 
> #include <activemq/util/Config.h>
> #include <cms/Connection.h>
> #include <cms/Session.h>
> #include <cms/TextMessage.h>
> #include <cms/BytesMessage.h>
> #include <cms/MapMessage.h>
> #include <cms/ExceptionListener.h>
> #include <cms/MessageListener.h>
> #include <string>
> 
> using namespace activemq;
> using namespace activemq::core;
> using namespace decaf;
> using namespace decaf::lang;
> using namespace decaf::util;
> using namespace decaf::util::concurrent;
> using namespace cms;
> using namespace std;
> 
> thanks for your help.
> 
> Nishant
> 
> 
> 
> Timothy Bish wrote:
>> 
>> On Thu, 2009-10-01 at 18:43 -0700, nmittal wrote:
>>> fails to run. The code has been running on ActiveMQ CPP 2.2.5. I
>>> recompiled
>>> the code with 3.0.1 but get the following error...
>>> 
>>> No Matching Factory Registered for format := tcp
>>>         FILE: activemq/transport/TransportRegistry.cpp, LINE: 50
>>>         FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 154
>>> 
>>> thanks for your help.
>>> 
>> 
>> You need to call the initialize method for the AMQCPP library:
>> 
>>     activemq::library::ActiveMQCPP::initializeLibrary();
>> 
>> On shutdown you need to call the shutdown method as well to ensure all
>> the open resources are freed.
>> 
>>     activemq::library::ActiveMQCPP::shutdownLibrary();
>> 
>> 
>> Take a look at the examples in the 3.0.1 source distribution.
>> 
>> Regards
>> Tim.
>> -- 
>> Tim Bish
>> http://fusesource.com
>> http://timbish.blogspot.com/
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-CMS%3A-Installed-3.0.1-but-my-existing-code-tp25720081p26133308.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message