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/