Here, The problem with the linking. You can use the following to execute the individual programs after installing the broker. Let us assume that you installed the broker with "cmake" in a separate directory * build/ *. you need to export the * LD_LIBRARY_PATH=/path/to/.so files/ * environmental variable. Then..
$ g++ -o hello hello_world.cpp -I /path/to/include/directory/in/qpid -L /path/to/.so files/in/build/src/folder -lqpidmessaging Also, link * -lqpidtypes * if needed. This will execute your programs. RajendraNPTL wrote > hello all > i am new to qpid. i am trying to execute the hello world program with g++ > compilor specifically (with out "make") > but, i am getting some errors. any body have idea regarding this ??? ( i > am using centos 6.3) > > $ > g++ -o hello hello_world.cpp -I /home/qpid-0.18/cpp/include/ > /tmp/cczB9Ivi.o: In function `main': > hello_world.cpp:(.text+0x169): undefined reference to > `qpid::messaging::Connection::Connection(std::basic_string<char, > std::char_traits<char>, std::allocator > <char> > > const&, std::basic_string<char, std::char_traits<char>, > std::allocator > <char> > > const&)' > hello_world.cpp:(.text+0x178): undefined reference to > `qpid::messaging::Connection::open()' > hello_world.cpp:(.text+0x1a1): undefined reference to > `qpid::messaging::Connection::createSession(std::basic_string<char, > std::char_traits<char>, std::allocator > <char> > > const&)' > hello_world.cpp:(.text+0x1e8): undefined reference to > `qpid::messaging::Session::createReceiver(std::basic_string<char, > std::char_traits<char>, std::allocator > <char> > > const&)' > hello_world.cpp:(.text+0x205): undefined reference to > `qpid::messaging::Session::createSender(std::basic_string<char, > std::char_traits<char>, std::allocator > <char> > > const&)' > hello_world.cpp:(.text+0x239): undefined reference to > `qpid::messaging::Message::Message(std::basic_string<char, > std::char_traits<char>, std::allocator > <char> > > const&)' > hello_world.cpp:(.text+0x254): undefined reference to > `qpid::messaging::Sender::send(qpid::messaging::Message const&, bool)' > hello_world.cpp:(.text+0x267): undefined reference to > `qpid::messaging::Message::~Message()' > hello_world.cpp:(.text+0x27b): undefined reference to > `qpid::messaging::Message::~Message()' > hello_world.cpp:(.text+0x2d6): undefined reference to > `qpid::messaging::Duration::SECOND' > hello_world.cpp:(.text+0x2db): undefined reference to > `qpid::messaging::operator*(qpid::messaging::Duration const&, unsigned > long)' > hello_world.cpp:(.text+0x2f7): undefined reference to > `qpid::messaging::Receiver::fetch(qpid::messaging::Duration)' > hello_world.cpp:(.text+0x30d): undefined reference to > `qpid::messaging::Message::getContent() const' > hello_world.cpp:(.text+0x366): undefined reference to > `qpid::messaging::Session::acknowledge(bool)' > hello_world.cpp:(.text+0x375): undefined reference to > `qpid::messaging::Connection::close()' > hello_world.cpp:(.text+0x389): undefined reference to > `qpid::messaging::Message::~Message()' > hello_world.cpp:(.text+0x39f): undefined reference to > `qpid::messaging::Message::~Message()' > hello_world.cpp:(.text+0x3bb): undefined reference to > `qpid::messaging::Sender::~Sender()' > hello_world.cpp:(.text+0x3d2): undefined reference to > `qpid::messaging::Sender::~Sender()' > hello_world.cpp:(.text+0x3e8): undefined reference to > `qpid::messaging::Receiver::~Receiver()' > hello_world.cpp:(.text+0x3ff): undefined reference to > `qpid::messaging::Receiver::~Receiver()' > hello_world.cpp:(.text+0x415): undefined reference to > `qpid::messaging::Session::~Session()' > hello_world.cpp:(.text+0x42c): undefined reference to > `qpid::messaging::Session::~Session()' > hello_world.cpp:(.text+0x483): undefined reference to > `qpid::messaging::Connection::close()' > hello_world.cpp:(.text+0x4b5): undefined reference to > `qpid::messaging::Connection::~Connection()' > hello_world.cpp:(.text+0x4cc): undefined reference to > `qpid::messaging::Connection::~Connection()' > collect2: ld returned 1 exit status > > thank you in advance -- View this message in context: http://qpid.2158936.n2.nabble.com/executing-qpid-c-programs-with-g-compiler-tp7590258p7598206.html Sent from the Apache Qpid users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
