Reload root macro on Windows

Dear all

I am not able to reload ROOT macro in ROOT sesson on Windows (latest ROOT with Visual Studio 2022)

First time, when I do “.L mymacro.C” - everything works. I can execute the macro, create plots etc. But if I do the same “.L mymacro.C” second time I see bunch of errors like this:

IncrementalExecutor::executeFunction: symbol '?message@_Iostream_error_category2@std@@UEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z' unresolved while linking function '??__E?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A@@YAXXZcling_module_35_'!
You are probably missing the definition of public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::_Iostream_error_category2::message(int)const __ptr64
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ' unresolved while linking function '??__E?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A@@YAXXZcling_module_35_'!
You are probably missing the definition of protected: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::numpunct<char>::do_grouping(void)const __ptr64
Maybe you need to load the corresponding shared library?
Symbol found in 'C:\Windows\System32\msvcp60.dll'; did you mean to load it with '.L C:\Windows\System32\msvcp60.dll'?
IncrementalExecutor::executeFunction: symbol '??_E?$basic_ostream@DU?$char_traits@D@std@@@std@@$4PPPPPPPM@A@EAAPEAXI@Z' unresolved while linking function '??__E?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A@@YAXXZcling_module_35_'!
You are probably missing the definition of [thunk]:public: virtual void * __ptr64 __cdecl std::basic_ostream<char,struct std::char_traits<char> >::`vector deleting destructor'`vtordisp{4294967292,0}' (unsigned int) __ptr64
Maybe you need to load the corresponding shared library?

Also, I am not able to compile macro with “.L mymacro.C++”
I only see stack trace like this:

==========================================
=============== STACKTRACE ===============
==========================================


================ Thread 0 ================
  libCore!TWinNTSystem::DispatchSignals()
  ucrtbase!seh_filter_exe()
  root!Init_thread_header()
  VCRUNTIME140!_C_specific_handler()
  ntdll!_chkstk()
  ntdll!RtlRaiseException()
  ntdll!KiUserExceptionDispatcher()
  libCore!TWinNTSystem::GetLibraries()
  libCore!TSystem::CompileMacro()
  libCling!TCling::ProcessLine()
  libCore!TApplication::ProcessLine()
  libRint!TRint::ProcessLineNr()
  libRint!TRint::HandleTermInput()
  libCore!TWinNTSystem::DispatchOneEvent()
  libCore!TSystem::InnerLoop()
  libCore!TSystem::Run()
  libCore!TApplication::Run()
  libRint!TRint::Run()
  root!??
  root!??
  KERNEL32!BaseThreadInitThunk()
  ntdll!RtlUserThreadStart()

======================

Could you please help me
Cheers, Sanya

ROOT Version: 6.26.02
Platform: Windows
Compiler: Visual Studio 2022


https://root-forum.cern.ch/search?q=reload%20macro%20order:latest

Hi @solodkov,

I guess that is happening on an interactive ROOT session. This issue is known (actually, several issues in GitHub were created to track this).

I have a patch already which should solve most of these problems in cling, but it will not be integrated in ROOT probably until the next major release.

Cheers,
J.