Hi ROOT Developers,
I need to build a class dictionary and I would like to have everything embedded in the compiled executable of my program.
In particular, I am working with std::vector<std::vector<float> >
, but I am interested in the more general problem.
This post clearly explains how to build the dictionary and a shared library.
At present, after generating the dictionary with rootcling
, I am compiling my program directly against mydict.cxx
file, that is:
gcc -o myProgram myProgram.cpp mydict.cxx ...
The program works and data are written to file.
In case the the file mydict_rdict.pcm
is missing in the executable’s directory, the following error is raised during runtime:
Error in <TCling::LoadPCM>: ROOT PCM mydict_rdict.pcm file does not exist
but the program works fine nevertheless.
In conclusion, my questions: is it correct what I am doing? If not, is it possible - and how - to have everything needed to write/read arbitrary classes to/from TFiles embedded in the executable of a program?
Best regards,
Loris
Please read tips for efficient and successful posting and posting code
ROOT Version: 6.20
Platform: MacOS & CentOS
Compiler: gcc