From 0117c542d45400b6d947ca43a081f0cd72636415 Mon Sep 17 00:00:00 2001 From: Bertrand Bellenot Date: Tue, 29 Mar 2022 10:59:32 +0200 Subject: [PATCH 1/2] [skip-ci][win] Export a couple of missing symbols Fix the `ntpl002_vector.C`, `ntpl005_introspection.C`, `ntpl006_friends.C`, and `ntpl007_mtFill.C` tutorials failing with the following errors: ``` Processing ntpl002_vector.C... IncrementalExecutor::executeFunction: symbol '_Smtx_unlock_shared' unresolved while linking [cling interface function]! You are probably missing the definition of _Smtx_unlock_shared Maybe you need to load the corresponding shared library? IncrementalExecutor::executeFunction: symbol '_Smtx_lock_shared' unresolved while linking [cling interface function]! You are probably missing the definition of _Smtx_lock_shared Maybe you need to load the corresponding shared library? ``` --- core/metacling/src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt index 104da6be54f28..11e01ca9b28e2 100644 --- a/core/metacling/src/CMakeLists.txt +++ b/core/metacling/src/CMakeLists.txt @@ -126,6 +126,8 @@ if(MSVC) __std_reverse_trivially_swappable_4 __std_reverse_trivially_swappable_8 __std_terminate + _Smtx_lock_shared + _Smtx_unlock_shared cling_runtime_internal_throwIfInvalidPointer ) if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64") From 4205f1b93714cc254d3c806f8be538aa22406cc7 Mon Sep 17 00:00:00 2001 From: Bertrand Bellenot Date: Tue, 29 Mar 2022 11:44:47 +0200 Subject: [PATCH 2/2] The missing symbols are for std:c++17 --- core/metacling/src/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt index 11e01ca9b28e2..00ce6f4730a68 100644 --- a/core/metacling/src/CMakeLists.txt +++ b/core/metacling/src/CMakeLists.txt @@ -126,10 +126,14 @@ if(MSVC) __std_reverse_trivially_swappable_4 __std_reverse_trivially_swappable_8 __std_terminate - _Smtx_lock_shared - _Smtx_unlock_shared cling_runtime_internal_throwIfInvalidPointer ) + if(CMAKE_CXX_STANDARD GREATER 14) + set(cling_exports ${cling_exports} + _Smtx_lock_shared + _Smtx_unlock_shared + ) + endif() if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64") set(cling_exports ${cling_exports} ??2@YAPEAX_K@Z