From ac0ee5603ae29e920bcb27c5a3ccbbcc531f2baf Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 22 Dec 2010 01:29:16 +0200 Subject: [PATCH] Added linkage dependency fix to pkg-config file. Enabled also the debug build options for c++ code. Signed-off-by: Mika Laitio --- README | 2 +- configure.ac | 4 +++- libplpbus.pc.in | 2 +- src/plpbus/BusClient.cc | 1 + src/plpbus/BusMessage.cc | 16 ++++++++-------- src/plpbus/OrbServerImpl.cc | 10 +++++----- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/README b/README index 8a1931b..74b6e0b 100644 --- a/README +++ b/README @@ -11,7 +11,7 @@ Build, install and clean ------------------------ - build with command: ./autobuild.sh (generates required autoconf files) - install with command: make install -- clean source code from generated build files: make distclean +- clean source code from generated build files: make maintainer-clean howto run test application -------------------------- diff --git a/configure.ac b/configure.ac index b238fad..b62bf78 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,9 @@ CFLAGS="$CFLAGS -g -Wall -Werror" LDFLAGS="$LDFLAGS" AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) -AC_MSG_NOTICE([objective c Makefile]) +CXXFLAGS="$CXXFLAGS -ggdb -Wall -Werror" +AC_SUBST(CXXFLAGS) +AC_MSG_NOTICE([libplpbus Makefile]) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) diff --git a/libplpbus.pc.in b/libplpbus.pc.in index 967a8af..19e8985 100644 --- a/libplpbus.pc.in +++ b/libplpbus.pc.in @@ -8,4 +8,4 @@ Description: pilppa communication bus library Version: @VERSION@ Requires: Cflags: -I${includedir} -I${includedir}/libplpbus -Libs: -L${libdir} +Libs: -L${libdir} -lplpbus diff --git a/src/plpbus/BusClient.cc b/src/plpbus/BusClient.cc index b69787b..2a84727 100644 --- a/src/plpbus/BusClient.cc +++ b/src/plpbus/BusClient.cc @@ -136,6 +136,7 @@ int BusClient::send_message_and_wait_response(BusMessage *msg_req_param, BusMess seq_rsp = NULL; _server->send_dataitem_message_and_wait_response(msg_req_param->_dataItemSeq, seq_rsp); + return 0; } void BusClient::request_shutdown() { diff --git a/src/plpbus/BusMessage.cc b/src/plpbus/BusMessage.cc index bc05f07..84cd386 100644 --- a/src/plpbus/BusMessage.cc +++ b/src/plpbus/BusMessage.cc @@ -171,14 +171,14 @@ void BusMessage::printout_dataitem(long index, plpbus_orb::DataItem *item) { const char *val; item->value >>= val; - log_debug(" [%d], value: %s\n", index, val); + log_debug(" [%ld], value: %s\n", index, val); } break; case tk_long: { long val; item->value >>= val; - log_debug(" [%d], value: %ld\n", index, val); + log_debug(" [%ld], value: %ld\n", index, val); //val_str = strdup("long"); } break; @@ -186,7 +186,7 @@ void BusMessage::printout_dataitem(long index, plpbus_orb::DataItem *item) { { double val; item->value >>= val; - log_debug(" [%d], value: %f\n", index, val); + log_debug(" [%ld], value: %f\n", index, val); //val_str = strdup("double"); } break; @@ -194,20 +194,20 @@ void BusMessage::printout_dataitem(long index, plpbus_orb::DataItem *item) { { float val; item->value >>= val; - log_debug(" [%d] name: %s, value: %f\n", index, val); + log_debug(" [l%ld] value: %f\n", index, val); //val_str = strdup("float"); } break; default: - log_error(" [%d] name, value unknown\n", index); + log_error(" [%ld], value unknown\n", index); } } else { - log_error(" [%d] Invalid data item name name or value\n", index); + log_error(" [%ld] Invalid data item name name or value\n", index); } } else { - log_error(" [%d] dataItem NULL.", index); + log_error(" [%ld] dataItem NULL.", index); } } @@ -216,7 +216,7 @@ void BusMessage::printout() { DataItem item; count = _dataItemSeq.length(); - log_debug("BusMessage.printout(): parameter count: %l\n", count); + log_debug("BusMessage.printout(): parameter count: %ld\n", count); for (long ii = 0; ii < count; ii++) { item = _dataItemSeq[ii]; printout_dataitem(ii, &item); diff --git a/src/plpbus/OrbServerImpl.cc b/src/plpbus/OrbServerImpl.cc index ea651a9..4317ff1 100644 --- a/src/plpbus/OrbServerImpl.cc +++ b/src/plpbus/OrbServerImpl.cc @@ -86,7 +86,7 @@ void OrbServerImpl::send_dataitem_message_and_request_response(OrbClient_ptr res msg_req->printout(); msg_rsp = NULL; _listener->request_received(msg_req, &msg_rsp); - log_debug("msg_rsp length: %d\n", msg_rsp->_dataItemSeq.length()); + log_debug("msg_rsp length: %ld\n", msg_rsp->_dataItemSeq.length()); msg_rsp->printout(); response_listener_param->receive_response_dataitem_sequence(msg_rsp->_dataItemSeq); } @@ -287,10 +287,10 @@ CosNaming::NamingContext_var OrbServerImpl::get_service_naming_context(const cha } catch (CORBA::NO_RESOURCES&) { log_error("Failed to get context from name service for %s, Name service is not running or has configuration problem.\n", service_name_param); - log_error("Things to check:\n", service_name_param); - log_error("If you have OMNIORB_CONFIG environment variable defined, verify that omniORB.cfg file exist in that location.\n", service_name_param); - log_error("If you do not have OMNIORB_CONFIG environment variable defined, verify that you have /etc/omniORB.cfg file\n", service_name_param); - log_error("Verify that InitRef line is defined in omniORB.cfg file.\n", service_name_param); + log_error("Check-list:\n"); + log_error("If you have OMNIORB_CONFIG environment variable defined, verify that omniORB.cfg file exist in that location.\n"); + log_error("If you do not have OMNIORB_CONFIG environment variable defined, verify that you have /etc/omniORB.cfg file\n"); + log_error("Verify that InitRef line is defined in omniORB.cfg file.\n"); } catch(CORBA::SystemException& ex) { log_error("Failed to get context from name service for %s, system error.\n", service_name_param); -- 2.41.1