Lalit Nagpal wrote: > > I ran into all these errors when trying to compile the ActiveMQ C++ client > ... > > error C2039: 'AutoAcknowledge' : is not a member of 'cms::Session' > e:\CPP\activemq-cpp\src\main\cms\Session.h(36) : see declaration of > 'cms::Session' > error C2039: 'NONPERSISTANT' : is not a member of 'cms::Message' > e:\CPP\activemq-cpp\src\main\cms\Message.h(33) : see declaration of > 'cms::Message' > error C2065: 'AutoAcknowledge' : undeclared identifier > error C2065: 'NONPERSISTANT' : undeclared identifier > error C2259: 'HelloWorldConsumer' : cannot instantiate abstract class > due to following members: 'void cms::MessageListener::onMessage(const > cms::Message *)' : pure virtual function was not defined > e:\CPP\activemq-cpp\src\main\cms\MessageListener.h(46) : see declaration > of 'cms::MessageListener::onMessage' > error C2664: 'cms::Session::createProducer' : cannot convert parameter 1 > from 'cms::Destination' to 'const cms::Destination *' No > user-defined-conversion operator available that can perform this > conversion, or the operator cannot be called > error C2664: 'void cms::MessageProducer::send(cms::Message *) > throw(cms::CMSException)' : cannot convert parameter 1 from > 'cms::TextMessage' to 'cms::Message *' > No user-defined-conversion operator available that can perform this > conversion, or the operator cannot be called > > I specified the activemq-cpp\src\main in the project settings > (Configuration Properties -> C/C++ -> General ->Additional Include > Directories) so that it is possible for the compiler to get all the > include files from this base directory. > > Still I ran into all the errors stated above, am i using a wrong version > or something. > > >
Tim I think the problem is something else ... I was able to resolve some of the errors in the sample code given ... example : AutoAcknowledge problem is resolved if you use Session::AUTO_ACKNOWLEDGE instead. It compiles then. The virtual function void onMessage(const Message &message) is given in the example whereas expected implementation in this code is void onMessage(const Message *message) Despite resolving these ... I run into the following probs now ... linking errors activemqlib error LNK2019: unresolved external symbol "public: __thiscall activemq::concurrent::Thread::Thread(class activemq::concurrent::Runnable *)" ([EMAIL PROTECTED]@activemq@@[EMAIL PROTECTED]@12@@Z) referenced in function _main activemqlib error LNK2019: unresolved external symbol "public: __thiscall activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([EMAIL PROTECTED]@activemq@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@[EMAIL PROTECTED]@2@@std@@[EMAIL PROTECTED]) referenced in function "public: virtual void __thiscall HelloWorldProducer::run(void)" ([EMAIL PROTECTED]@@UAEXXZ) activemqlib error LNK2019: unresolved external symbol "public: static unsigned long __cdecl activemq::concurrent::Thread::getId(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@SAKXZ) referenced in function "public: virtual void __thiscall HelloWorldProducer::run(void)" ([EMAIL PROTECTED]@@UAEXXZ) activemqlib error LNK2019: unresolved external symbol "public: static void __cdecl activemq::concurrent::Thread::sleep(int)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function "public: virtual void __thiscall HelloWorldConsumer::run(void)" ([EMAIL PROTECTED]@@UAEXXZ) activemqlib error LNK2019: unresolved external symbol "public: virtual __thiscall activemq::concurrent::Thread::~Thread(void)" ([EMAIL PROTECTED]@activemq@@[EMAIL PROTECTED]) referenced in function _main activemqlib error LNK2019: unresolved external symbol "public: virtual void __thiscall activemq::concurrent::Thread::join(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@UAEXXZ) referenced in function _main activemqlib error LNK2019: unresolved external symbol "public: virtual void __thiscall activemq::concurrent::Thread::start(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@UAEXXZ) referenced in function _main -- View this message in context: http://www.nabble.com/errors-when-compiling-activemq-cpp-client-tf2072610.html#a5739020 Sent from the ActiveMQ - User forum at Nabble.com.
