activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: create a new project and refer to ActiveMQ-CPP files. Compile is fail
Date Thu, 25 Jun 2009 00:07:57 GMT
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/<myaccount>/<myinstalldir> 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/




Mime
View raw message