From 065c5da055411dfedc2689f97a52086325deb6e2 Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Wed, 14 Dec 2016 09:42:17 -0800 Subject: [PATCH] [IOT-1682] Windows: fix linker error for SECURED=0 Linking with static LIB octbstack_test on Windows requires linking with static LIB ocsrm too. Also, ocsrm has been removed from the list of LIBS of this test, for non-Windows platforms. On these platforms, octbstack_test is a shared LIB, that already includes static LIB ocsrm. Change-Id: I4a73029689f137e615ecf721fa89d9498904301d Signed-off-by: Dan Mihai Reviewed-on: https://gerrit.iotivity.org/gerrit/15627 Reviewed-by: Phil Coval Tested-by: jenkins-iotivity Reviewed-by: Greg Zaverucha Reviewed-by: Kevin Kane Reviewed-by: Mike Fenelon --- resource/csdk/security/SConscript | 2 +- resource/unittests/SConscript | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resource/csdk/security/SConscript b/resource/csdk/security/SConscript index ab26e3a..b6cdc62 100644 --- a/resource/csdk/security/SConscript +++ b/resource/csdk/security/SConscript @@ -18,7 +18,7 @@ # // # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # -# libocsrm (share library) build script +# libocsrm (static library) build script ## Import('env') diff --git a/resource/unittests/SConscript b/resource/unittests/SConscript index fbe6c94..07aff19 100644 --- a/resource/unittests/SConscript +++ b/resource/unittests/SConscript @@ -49,8 +49,8 @@ unittests_env.PrependUnique(CPPPATH = [ if target_os in ['windows']: unittests_env.AppendUnique(LIBS = ['ws2_32', 'advapi32', 'iphlpapi', 'bcrypt', 'crypt32']) unittests_env.AppendUnique(CPPPATH = ['#extlibs/boost/boost']) - -if unittests_env.get('SECURED') == '1': + # On Windows, octbstack_test is a static LIB, that makes calls into static LIB ocsrm. + # On other platforms, octbstack_test is a shared LIB, that includes static LIB ocsrm. unittests_env.AppendUnique(LIBS = ['ocsrm']) unittests_env.AppendUnique(LIBPATH = [unittests_env.get('BUILD_DIR')]) -- 2.7.4