From e8868b098dcb63fbd52f2912bafa6bbe55aba753 Mon Sep 17 00:00:00 2001 From: Caiwen Zhang Date: Tue, 24 Mar 2015 15:37:12 +0800 Subject: [PATCH] fix notification manager sample app build error liboc.so isn't required to be linked when build C application Otherwise there may be following error: out/linux/x86_64/release/liboc.so: undefined reference to `std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const@GLIBCXX_3.4.18' Change-Id: Idbb5ca305c22477aba19495c8e2b8cf5278bd058 Signed-off-by: Caiwen Zhang Reviewed-on: https://gerrit.iotivity.org/gerrit/554 Tested-by: jenkins-iotivity Reviewed-by: minsuk1.choi Reviewed-by: JungYong KIM Reviewed-by: Heewon Parkhi Reviewed-by: Uze Choi --- service/notification-manager/SampleApp/linux/SConscript | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/service/notification-manager/SampleApp/linux/SConscript b/service/notification-manager/SampleApp/linux/SConscript index 95c5a7d..77578e3 100644 --- a/service/notification-manager/SampleApp/linux/SConscript +++ b/service/notification-manager/SampleApp/linux/SConscript @@ -13,15 +13,18 @@ notimgr_env = lib_env.Clone() ###################################################################### notimgr_env.AppendUnique(CPPPATH = ['../../NotificationManager/include']) notimgr_env.AppendUnique(CPPPATH = ['../../../../extlibs/cjson']) -notimgr_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'coap', 'pthread','NOTISDKLibrary']) notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0']) +notimgr_c_env = notimgr_env.Clone() +notimgr_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'coap', 'pthread','NOTISDKLibrary']) +notimgr_c_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'coap', 'pthread','NOTISDKLibrary']) ###################################################################### # Source files and Targets ###################################################################### sampleprovider = notimgr_env.Program('sampleprovider', 'sampleProvider/SampleProvider.cpp') sampleconsumer = notimgr_env.Program('sampleconsumer', 'sampleConsumer/SampleConsumer.cpp') -notificationmanager = notimgr_env.Program('notificationmanager', 'notificationManager/main.c') + +notificationmanager = notimgr_c_env.Program('notificationmanager', 'notificationManager/main.c') #notimgr_env.InstallTarget(sampleprovider, 'sampleprovider') #notimgr_env.InstallTarget(sampleconsumer, 'sampleconsumer') -- 2.7.4