Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 46248 invoked from network); 10 Aug 2006 12:49:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 12:49:41 -0000 Received: (qmail 7053 invoked by uid 500); 10 Aug 2006 12:49:41 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 7037 invoked by uid 500); 10 Aug 2006 12:49:41 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 7020 invoked by uid 99); 10 Aug 2006 12:49:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 05:49:41 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [199.105.164.5] (HELO smtpmail2.sensis.com) (199.105.164.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 05:49:40 -0700 Received: from dimstar2.ats.sensis.com ([172.21.1.6]) by smtpmail2.sensis.com with esmtp (Exim 4.50) id 1GB9yR-0004RZ-AM for activemq-users@geronimo.apache.org; Thu, 10 Aug 2006 08:49:19 -0400 Received: from corpatsmail1.ats.sensis.com ([172.21.1.88] helo=corpatsmail1.corp.sensis.com) by dimstar2.ats.sensis.com with esmtp (Exim 4.50) id 1GB9y2-0003nb-AQ for activemq-users@geronimo.apache.org; Thu, 10 Aug 2006 08:48:54 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: errors when compiling activemq cpp client Date: Thu, 10 Aug 2006 08:48:04 -0400 Message-ID: <5A211522579EBD4A83155ED7FA1530637FC449@corpatsmail1.corp.sensis.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: errors when compiling activemq cpp client Thread-Index: Aca8dSryNpXePWfmQj+WSNmRsu/2MQABF8XQ From: "Bish, Tim" To: X-Sensis-MailScanner-Information: Scanned at Sensis Corporation by MailScanner X-Sensis-MailScanner: Found to be clean X-Sensis-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-4.245, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60, TW_MQ 0.08, TW_MV 0.08) X-Sensis-MailScanner-From: tim.bish@sensis.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > That would b great as anybody starting with ActiveMQ with C++ is likely to > use this piece of code first. Yup, it all comes down to time, a lot of us work on this in our spare time. You are welcome to fix up the example code and submit a patch. > I am using Microsoft Visual Studio .Net 2003 and created a windows console > application (empty project) .... I included the activemq directory in my > project with the following setting actually ... In the property pages -> > C/C++ (see in left tab) -> General -> Additional Include Directories ..... > here i specified the activemq-cpp\src\main directory which contains the > activemq and cms directories in it. So if i say goto declaration the IDE > takes me to the classes but dont know why i run into these linking > problems. Are you actually compiling the activemq-cpp code in your console projet? Or did you just add an include path to the code base? You need to build the activemq-cpp code either as a Library, or as part of the application that you are creating, I'd suggest making a library. If you install maven, you can build the library using the mvn package command, and just add the library into the linker settings / additional Libraries option. When you build the Library you should get an activemq-cpp.lib file that you can add. =20 Does that help? ----------------------------------------- Timothy A. Bish -----------------------------------------=20 > -----Original Message----- > From: Lalit Nagpal [mailto:lalittechy@rediffmail.com] > Sent: Thursday, August 10, 2006 8:03 AM > To: activemq-users@geronimo.apache.org > Subject: RE: errors when compiling activemq cpp client >=20 >=20 > Tim- >=20 > That would b great as anybody starting with ActiveMQ with C++ is likely to > use this piece of code first. > I am using Microsoft Visual Studio .Net 2003 and created a windows console > application (empty project) .... I included the activemq directory in my > project with the following setting actually ... In the property pages -> > C/C++ (see in left tab) -> General -> Additional Include Directories ..... > here i specified the activemq-cpp\src\main directory which contains the > activemq and cms directories in it. So if i say goto declaration the IDE > takes me to the classes but dont know why i run into these linking > problems. >=20 > Thanks for all the support >=20 > Lalit .... >=20 >=20 >=20 >=20 > Bish, Tim wrote: > > > >> 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) > > > > We did some minor code cleanup in activemq-cpp to make the interfaces > > all more consistent. As a result of these changes some of the code in > > the example in no longer valid. It should be a simple thing to fix the > > compiler errors, which it seems you did. The link errors are saying > > that the functions from the Thread class are no being resolved from the > > Library, are you sure that your VC2003 project is building all those > > classes and linking them in. > > > > Hopefully by the weekend, when I have a little free time, I will have > > SVN access, and I can check in a cleaned up version of the example. I > > also think I can get access to a copy of VC2003 so when I get time I > > will try and create a VC2003 project; it won't completely solve the > > problem as those project files have hard coded paths in them. > > > > ----------------------------------------- > > Timothy A. Bish > > ----------------------------------------- > > > > > > > >> -----Original Message----- > >> From: Lalit Nagpal [mailto:lalittechy@rediffmail.com] > >> Sent: Thursday, August 10, 2006 2:29 AM > >> To: activemq-users@geronimo.apache.org > >> Subject: Re: errors when compiling activemq cpp client > >> > >> > >> > >> 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 > >> *)" (??0Thread@concurrent@activemq@@QAE@PAVRunnable@12@@Z) referenced > > in > >> function _main > >> activemqlib error LNK2019: unresolved external symbol "public: > > __thiscall > >> > > activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory(cla > > ss > >> std::basic_string,class > >> std::allocator > const &,class std::basic_string >> std::char_traits,class std::allocator > const &,class > >> std::basic_string,class > >> std::allocator > const &,class std::basic_string >> std::char_traits,class std::allocator > const &)" > >> > > (??0ActiveMQConnectionFactory@core@activemq@@QAE@ABV?$basic_string@DU?$c > > ha > >> r_traits@D@std@@V?$allocator@D@2@@std@@000@Z) > >> referenced in function "public: virtual void __thiscall > >> HelloWorldProducer::run(void)" (?run@HelloWorldProducer@@UAEXXZ) > >> activemqlib error LNK2019: unresolved external symbol "public: static > >> unsigned long __cdecl activemq::concurrent::Thread::getId(void)" > >> (?getId@Thread@concurrent@activemq@@SAKXZ) referenced in function > > "public: > >> virtual void __thiscall HelloWorldProducer::run(void)" > >> (?run@HelloWorldProducer@@UAEXXZ) > >> activemqlib error LNK2019: unresolved external symbol "public: static > > void > >> __cdecl activemq::concurrent::Thread::sleep(int)" > >> (?sleep@Thread@concurrent@activemq@@SAXH@Z) referenced in function > >> "public: > >> virtual void __thiscall HelloWorldConsumer::run(void)" > >> (?run@HelloWorldConsumer@@UAEXXZ) > >> activemqlib error LNK2019: unresolved external symbol "public: virtual > >> __thiscall activemq::concurrent::Thread::~Thread(void)" > >> (??1Thread@concurrent@activemq@@UAE@XZ) referenced in function _main > >> activemqlib error LNK2019: unresolved external symbol "public: virtual > >> void > >> __thiscall activemq::concurrent::Thread::join(void)" > >> (?join@Thread@concurrent@activemq@@UAEXXZ) referenced in function > > _main > >> activemqlib error LNK2019: unresolved external symbol "public: virtual > >> void > >> __thiscall activemq::concurrent::Thread::start(void)" > >> (?start@Thread@concurrent@activemq@@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. > > > > > > >=20 > -- > View this message in context: http://www.nabble.com/errors-when-compiling- > activemq-cpp-client-tf2072610.html#a5742880 > Sent from the ActiveMQ - User forum at Nabble.com.