fix notification manager sample app build error
authorCaiwen Zhang <caiwen.zhang@intel.com>
Tue, 24 Mar 2015 07:37:12 +0000 (15:37 +0800)
committerUze Choi <uzchoi@samsung.com>
Mon, 30 Mar 2015 01:59:09 +0000 (01:59 +0000)
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<caiwen.zhang@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/554
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: minsuk1.choi <minsuk1.choi@samsung.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Heewon Parkhi <h_w.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification-manager/SampleApp/linux/SConscript

index 95c5a7d..77578e3 100644 (file)
@@ -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')