activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From justinj656 <justinjia1...@163.com>
Subject "undefined reference to" errors
Date Sun, 09 Mar 2014 13:44:44 GMT
Hi,
    there are some link errors when I use g++ to build my codes.
    To begin with, I build and install the activemq-cpp 3.8.2 following the
readme.txt with default settings and everything is ok. In addtion I run
"make test" and "./activemq-test-integration", all the tests are passed.
Then I begin to build my own cpp file with the command  below:
g++ -I/usr/local/include/activemq-cpp-3.8.2/ -I/usr/local/apr/include/apr-1
-L/usr/local/lib -lactivemq-cpp -o a.o ~/Desktop/Test.cpp
my code is correctly compiled but with a lot of "undefined reference to"
errors, like:
Simple.cpp:(.text+0x1a): undefined reference to
`activemq::library::ActiveMQCPP::initializeLibrary()'
Simple.cpp:(.text+0x166): undefined reference to
`activemq::library:::shutdownLibrary()'
    I am sure my dictories are right, but the linker just can not find the
corresponding functions. And I really have no idea. Am I missing something?
Please give me a hand.
ps:my OS is Ubuntu 12.04.4 LTS 64bit version




--
View this message in context: http://activemq.2283324.n4.nabble.com/undefined-reference-to-errors-tp4678665.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message