Timothy Bish wrote:
> 
> On Thu, 2009-06-25 at 08:51 -0700, dongabda wrote:
>> How can I embed the libapr-1.a and libapr-util-1.a into libactivemqcpp.a? 
>> 
>> I've an application that uses activemq. I put the -lactivemq to the
>> linker
>> flags but compiling it reports this errror: 
>> 
>> /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../libactivemq-cpp.a(libactivemq_cpp_la-Exception.o):
>> In function `decaf::lang::Exception::buildMessage(char const*, char*&)':
>> /home/activemqtest/Download/activemq-cpp-library-3.0/src/main/decaf/lang/Exception.cpp:93:
>> undefined reference to `apr_pvsprintf'
>> 
>> I made  ./configure LIBS='-lapr-1 -laprutil-1'. After that I built
>> activemqcpp again but the error is the same. 
>> 
> 
> Static libs aren't linked with other libs, they are all linked together
> by the linker when you build your executable.  You need to pass to the
> linker all the static libs that your executable needs when you build it.
> 
> Regards
> Tim.
> 
> 
> -- 
> Tim Bish
> http://fusesource.com
> http://timbish.blogspot.com/
> 
> 
> 
> 
> 

I pass to the linker the apr, apr-utils and activempqcc static libraries,
but when I compile it, the compiles gives a lot of errors like this:

usr/lib/gcc/i386-redhat-linux/4.3.2/../../../libactivemq-cpp.a(libactivemq_cpp_la-Exception.o):
> In function `decaf::lang::Exception::buildMessage(char const*, char*&)':
> /home/activemqtest/Download/activemq-cpp-library-3.0/src/main/decaf/lang/Exception.cpp:93:
> undefined reference to `apr_pvsprintf'

Why? 
 

-- 
View this message in context: 
http://www.nabble.com/build-activemqcpp-embedding-apr1-apr-util-1-static-libraries-%28Linux%29-tp24205943p24215731.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to