Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 28809 invoked from network); 25 Jun 2009 00:08:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 00:08:20 -0000 Received: (qmail 39750 invoked by uid 500); 25 Jun 2009 00:08:31 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 39688 invoked by uid 500); 25 Jun 2009 00:08:30 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 39678 invoked by uid 99); 25 Jun 2009 00:08:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 00:08:30 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tabish121@gmail.com designates 209.85.221.175 as permitted sender) Received: from [209.85.221.175] (HELO mail-qy0-f175.google.com) (209.85.221.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 00:08:20 +0000 Received: by qyk5 with SMTP id 5so1593487qyk.22 for ; Wed, 24 Jun 2009 17:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=JStwaAFZxsH8ZeoQmTG8Fn78rQeafOeSaPJit9U/p+k=; b=JNGdY+PFllDLmaDrWuCp70dggbO+X6QaFFoVuAKcrVaX10+6ILbiPjSa5Ssjo9GD3c SioVVOmbutHsgL29oZu5+vvnodQrUe5yd/BG9uWeMLl/GOe0L3oHMnW9s+GhuHQVBWLX OIKOENH4zRTOSb4b2iFCibZglIN7XsP0O0HdM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=NBiU7/mHYPzr2ImCNILrZLZBrco6H0Vdh9D0HfzYOOvzb9/UEc/s+Cs/Ns58XuPijA hkCrdK5Jt3AfScKR/G3Gmt734ODqwkVGs7TTrmD6XIDpoDnFZ0bYVOEZiYFGzeDXc7JK GtyHhOS3cyKC6jZTR34j+r/JrgrPBH6OwLfxw= Received: by 10.224.80.138 with SMTP id t10mr1562336qak.344.1245888479902; Wed, 24 Jun 2009 17:07:59 -0700 (PDT) Received: from ?192.168.2.199? ([68.49.143.174]) by mx.google.com with ESMTPS id 7sm3374060qwf.46.2009.06.24.17.07.58 (version=SSLv3 cipher=RC4-MD5); Wed, 24 Jun 2009 17:07:59 -0700 (PDT) Subject: Re: create a new project and refer to ActiveMQ-CPP files. Compile is fail From: Timothy Bish To: users@activemq.apache.org In-Reply-To: <24194844.post@talk.nabble.com> References: <24192861.post@talk.nabble.com> <1245885176.8387.32.camel@localhost.localdomain> <24194618.post@talk.nabble.com> <1245886466.8387.34.camel@localhost.localdomain> <24194844.post@talk.nabble.com> Content-Type: text/plain Date: Wed, 24 Jun 2009 20:07:57 -0400 Message-Id: <1245888477.3223.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 2009-06-24 at 16:53 -0700, pclovec wrote: > thanks very much. i got it . small question . in source code folder have more > sub folder . each sub folder include one .libs folder ,, i can so the > libactivemq-cpp.so and so.9 ,..so.9.0.. file in .../src/main/.libs folder. > > i just want to ask which folder do i need add into ld.so.conf file . or > need to add all libs folder? > Well you normally don't add temporary folders into the ld.so.conf, you'd usually build the activemqcpp client and do a make install which by default would put the libraries into /usr/local/lib on some systems this is in the ld config be default on some its not. The install will also place the headers into /usr/local/include as well. If you want make install to place everything into some location in your home folder you could run configure with --prefix=/home// and then add that to an the LD_LIBRARY_PATH env value in your .bashrc for instance. It just depends on what you are doing for the install of ActiveMQ-CPP. Regards Tim. > thanks > > > > Timothy Bish wrote: > > > > On Wed, 2009-06-24 at 16:26 -0700, pclovec wrote: > >> hi, Tim > >> > >> thanks, yes at first time i didn't link this file . Eclipse CDT link > >> file > >> is some difference . i only input the activemq-cpp is be fine . if i > >> input > >> /usr/.../libactivemq-cpp.so file then it will give me can't find out the > >> so > >> file.. sigh... > >> > >> now i have add link the libactivemq-cpp.so file . it compile succeeful. > >> but > >> when i try to running the test file it show me > >> > >> # ./testcpp1 > >> ./testcpp1: error while loading shared libraries: libactivemq-cpp.so.9: > >> cannot open shared object file: No such file or directory > >> # > > > > Most likely the activemqcpp libs location is not in your LD_LIBRARY_PATH > > or ld.so.conf file depending on your distro. > > > > > > > >> > >> by the way ,if i don't want to refer to so file . i would like refer the > >> activemq-cpp o file or lib file . what can i do. could you can give me > >> some > >> advice sorry i just a new cpp developer.. > >> > > > > You can link against the libactivemqcpp.a static lib to have it built > > into you application. > > > >> > >> thanks > >> > >> > >> > >> > >> > >> > >> Timothy Bish wrote: > >> > > >> > On Wed, 2009-06-24 at 14:02 -0700, pclovec wrote: > >> >> hi, All > >> >> > >> >> i download the activemq-cpp 3.0 source to my local and i can compile > >> on > >> >> my > >> >> machine . ...make..make install and running the example is well. > >> >> > >> >> now i create a new c++ project on eclipse . and just wrote a sample > >> code. > >> >> and include the activemq-cpp src folder ..../src/main/ all .h file > >> and > >> >> i > >> >> have linked some lib folders. ,apr ,apr-util.. i try to build > >> project > >> >> is > >> >> show me > >> >> ---------------------------------------------------- > >> >> Description Resource Path Location Type > >> >> undefined reference to > >> >> > >> `activemq::core::ActiveMQConnectionFactory::ActiveMQConnectionFactory(std::basic_string, > >> >> std::allocator > const&, std::basic_string, std::allocator > const&, > >> >> std::basic_string, std::allocator > const&)' Simple.cpp testcpp1/src > >> line > >> >> 152 C/C++ Problem > >> >> > >> >> Description Resource Path Location Type > >> >> undefined reference to > >> >> `activemq::library::ActiveMQCPP::initializeLibrary()' > >> >> SimpleAsyncConsumer.cpp testcpp1/src line 269 C/C++ Problem > >> >> > >> >> > >> >> Description Resource Path Location Type > >> >> undefined reference to > >> >> `activemq::library::ActiveMQCPP::shutdownLibrary()' > >> >> SimpleAsyncConsumer.cpp testcpp1/src line 334 C/C++ Problem > >> >> > >> >> > >> ------------------------------------------------------------------------------ > >> >> so i'm confused for it. do i miss some lib files . any help > >> >> > >> >> thanks > >> >> > >> >> > >> > > >> > Sounds like you aren't linking to the libactivemqcpp.so. > >> > > >> > Regards > >> > Tim. > >> > > >> > > >> > -- > >> > Tim Bish > >> > http://fusesource.com > >> > http://timbish.blogspot.com/ > >> > > >> > > >> > > >> > > >> > > >> > > > > > > > -- Tim Bish http://fusesource.com http://timbish.blogspot.com/