Skip to content

Commit

Permalink
[core] Fix unresolved '_Thrd_sleep_for@4' symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
bellenot committed Mar 15, 2024
1 parent a91045d commit 08460af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
6 changes: 0 additions & 6 deletions core/metacling/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ if(MSVC)
)
endif()

if(MSVC_VERSION GREATER_EQUAL 1939)
set(cling_exports ${cling_exports}
_Thrd_sleep_for
)
endif()

set(cling_exports ${cling_exports}
_Smtx_lock_shared
_Smtx_unlock_shared
Expand Down
5 changes: 4 additions & 1 deletion core/winnt/src/TWinNTSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#include <conio.h>
#include <time.h>
#include <bcrypt.h>
#include <chrono>
#include <thread>

#if defined (_MSC_VER) && (_MSC_VER >= 1400)
#include <intrin.h>
Expand Down Expand Up @@ -1130,6 +1132,7 @@ Bool_t TWinNTSystem::Init()
if (buf[0]) AddDynamicPath(buf);
}
delete [] buf;
std::this_thread::sleep_for(std::chrono::duration<double, std::nano>(10));
SetConsoleWindowName();
fGroupsInitDone = kFALSE;

Expand Down Expand Up @@ -4579,7 +4582,7 @@ TTime TWinNTSystem::Now()

void TWinNTSystem::Sleep(UInt_t milliSec)
{
::Sleep(milliSec);
std::this_thread::sleep_for(std::chrono::milliseconds(milliSec));
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
6 changes: 0 additions & 6 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,6 @@ endif()
if(MSVC)
#---Multiproc is not supported on Windows
set(imt_veto ${imt_veto} multicore/mp*.C multicore/mtbb201_parallelHistoFill.C)
if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT win_broken_tests)
# std::this_thread::sleep_for(std::chrono::duration<double, std::nano>(500));
# fails on Windows 32 bit and Visual Studio v17.9 with the following error:
# IncrementalExecutor::executeFunction: symbol '_Thrd_sleep_for@4' unresolved while linking [cling interface function]!
set(imt_veto ${imt_veto} multicore/mt201_parallelHistoFill.C)
endif()
endif()

if(ROOT_CLASSIC_BUILD)
Expand Down

0 comments on commit 08460af

Please sign in to comment.