Hello,
I am trying to work with std::vector in a ROOT macro.
The first time, I run the code, it runs without problem. The second time, it gives me the following error and does not run. I have to restart root and then it works well again.
IncrementalExecutor::executeFunction: symbol ‘ZSt4moveIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_ET0_T_S8_S7’ unresolved while linking [cling interface function]!
You are probably missing the definition of __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > > std::move<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > > >(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > >)
Maybe you need to load the corresponding shared library?
Am I doing something wrong or is there a problem with my compilation or version of ROOT? Is there a solution to this problem?
We have known issues with reloading of code; this is certainly one of them. Your most stable option is to quit ROOT and restart - and believe me, I know just how terrible this is I really hope we will be able to tackle this in 2019…
Hi Enric and Axel,
Thank you very much for your replies.
Axel, thank you for letting me know. Right now, I am doing what you said, quitting and restarting. It is a bit annoying, but certainly manageable. I wanted to be certain it wasn’t something I was doing wrong.
Enric, if I run it the way you do, it does not pose problem. It fails when I run .x sub_vector_simple.C twice in a row. Or else it fails if I make a change to the macro, load it again and then try to run it.
root [0] .L sub_vector_simple.C
root [1] sub_vector_simple()
1000
1001
1002
1003
1007
1008
1009
root [2] .L sub_vector_simple.C
root [3] sub_vector_simple()
IncrementalExecutor::executeFunction: symbol '_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES6_ET0_T_S8_S7_' unresolved while linking [cling interface function]!
You are probably missing the definition of __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > > std::move<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > > >(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >)
Maybe you need to load the corresponding shared library?
root [4]