Error in <TCling::RegisterModule>: cannot find dictionary module dictionary_rdict.pcm

I want to store a map of objects in a ROOT file.
The map is declared in mymap.h and I use the #pragma directive

#pragma link C++ class std::map <int, std::map <int, TH1F*> >;

I have created a dictionary with
rootcint mymap.C -c mymap.h

I have copied the resulting mymap_rdict.pcm and mymap.C into my project.

When I run (with ROOT 6.02/08)
I get the following error message:

Error in TCling::RegisterModule: cannot find dictionary module dictionary_rdict.pcm

And the map is not written into the ROOT file.

I don’t understant why the complain is about the file dictionary_rdict.pcm,
while my .pcm file has a different name.

Any help is greatly appreciated.

Stefano

Hi Stefano,

the pcm file is to be considered a part of the dictionary. Indeed it’s used by ROOT to know how to persist the classes on disk.
The pcm should also sit next to the library containing the compiled dictionary: could you try and put it in the right place? An example of this mechanism is ROOT itself. All libraries and all pcms sit in the lib directory.

Cheers,
Danilo