Hi,
It looks like libROOTDataFrame is not being liked to your program. Does ${ROOT_LIBRARIES} contain ROOTDataFrame? Alternatively, can you try adding ROOTDataFrame or ROOT::ROOTDataFrame explicitly to the target_link_libraries?
No, that’s not it, I think that there is a mismatch in C++ standards being used. Just remove the last line from your CMakeLists.txt in which you set the CXX_STANDARD property. The ROOT libraries already export this property. You have to ensure that your code is compiled with the same stardard as ROOT or it will not work. Cheers,
Thank you for your reply. It seems that the problem I had is related to the other library (PyTorch) that I want to compile it with root. That if I have this small program
Everything linked with ROOT must use the same C++ standard as ROOT, if ROOT is compiled with C++11, then it’s ok to have what you have above, otherwise, you have to recompile either ROOT or PyTorch to make it work if they are using different versions of the C++ standard. Cheers,