Open3

ROOTインタプリンタでマクロを実行すると IncrementalExecutor::executeFunction: symbol ... unresolved となって実行できない

yano404yano404

ROOTのインタプリンタでマクロを実行すると, 1回目は実行できるのに2回目は失敗する.

root [0] .x setfirstevtflag.C("/path/to/fin1.root", "/path/to/fout1.root")
root [1] .x setfirstevtflag.C("/path/to/fin2.root", "/path/to/fout2.root")
IncrementalExecutor::executeFunction: symbol '_ZNSt3__1L17__cxx_atomic_loadIP10TDirectoryEET_PKNS_22__cxx_atomic_base_implIS3_EENS_12memory_orderE' unresolved while linking [cling interface function]!
You are probably missing the definition of TDirectory* std::__1::__cxx_atomic_load(std::__1::__cxx_atomic_base_impl const*, std::__1::memory_order)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZNSt3__18ios_base8setstateEj' unresolved while linking [cling interface function]!
You are probably missing the definition of std::__1::ios_base::setstate(unsigned int)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZNSt3__1L12__to_addressIcEEPT_S2_' unresolved while linking [cling interface function]!
You are probably missing the definition of char* std::__1::__to_address(char*)
Maybe you need to load the corresponding shared library?
yano404yano404

コンパイルした実行ファイルは問題なく動く.

$ g++ `root-config --cflags --libs` setfirstevtflag.C -o setfirstevtflag.o
$ ./setfirstevtflag.o /path/to/fin1.root /path/to/fout1.root
$ ./setfirstevtflag.o /path/to/fin2.root /path/to/fout2.root