Re: No dictionaries for std::complex

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Mon, 21 May 2012 14:11:24 -0500


Hi,

 > does its dictionary go into dictionary.cxx?

Yes, it does. The command line:

     rootcint -f dictionary.cxx -c TAlm.cxx

request only the dictionary for TAlm (and not for any of its data member's type to avoid dictionary duplication).

 > I make no use of TApplication,

Thus I am guessing the autoloader is not enabled and thus you need to load the dictionary for (std::complex) explicitly.

Cheers,
Philippe.

On 5/21/12 2:02 PM, Marcelo Zimbres wrote:
> Hi Phillipe,
>
> I make no use of TApplication, it is just a main function linked to a library of mine and to root libraries. Just out of
> curiosity, when I use
>
> rootcint -f dictionary.cxx -c TAlm.cxx
>
> to generate dictionaries for a class TAlm, which has a data member std::complex. does its dictionary go into dictionary.cxx? If
> not, where are the dictionaries loaded from?
>
> Cheers,
> Marcelo
>
> 2012/5/21 Philippe Canal <pcanal_at_fnal.gov <mailto:pcanal_at_fnal.gov>>
>
> Hi,
>
> Humm ... yes if the autoloader is properly initialized it should load the complex dictionary automatically.
> Did you create a TApplication object in your standalone example?
>
> Cheers,
> Philippe.
>
>
> On 5/21/12 11:27 AM, Marcelo Zimbres wrote:
>> Thanks Philippe,
>>
>> it seems then, that I have the right implementation, but anyway, I thought this was fixed due to the following post:
>> http://root.cern.ch/phpBB3/viewtopic.php?f=5&t=9618 <http://root.cern.ch/phpBB3/viewtopic.php?f=5&t=9618>, where you mention:
>>
>> "Hi,
>>
>> The ProcessLine call is only needed to work around a bug in the library autoloading setting affecting only the std::complex
>> classes (This is fixed in the trunk, revision 36617 and up).
>>
>> Cheers,
>> Philippe. "
>>
>> Maybe I misunderstood it? It is not clear to me when should I manually enforce a dictionary should be loaded.
>>
>> Cheers,
>> Marcelo
>>
>>
>>
>> 2012/5/21 Philippe Canal <pcanal_at_fnal.gov <mailto:pcanal_at_fnal.gov>>
>>
>> > but if I try the same on a standalone application,
>> > I get the error:
>>
>> In standalone application, you need to more configuration 'by hand'. In particular
>> you may have to load more dictionary explicitly. For example:
>>
>>
>> gROOT->ProcessLine("#include <complex>");
>>
>> will force the loading of the pre-canned std::complex dictionary.
>>
>> Cheers,
>> Philippe.
>>
>>
>> On 5/19/12 9:54 PM, Marcelo Zimbres wrote:
>>> Hi Root experts,
>>>
>>> I have a class which inherits from TNamed, with a std::complex<double> data member.
>>> When I compile it on Cint (.L TAlm.cxx+) and try to write an object of this class to
>>> a root file, everything goes fine, but if I try the same on a standalone application,
>>> I get the error:
>>>
>>> Error in <TAlm::fAlm streamer>: Missing the TClass object for complex<double>
>>>
>>> even though, my executable is linked to the library where the dictionary for TAlm should be
>>> (I use rootcint to generate dictionaries in this case and put them in the library). To fix
>>> the problem I am adding
>>>
>>> gROOT->ProcessLine("#include <complex>");
>>>
>>> in the main function, but I suppose this is not the right way to do it?
>>> Why my program does find the dictionary for std::complex?
>>>
>>> Thanks in advance,
>>> Marcelo
>>>
>>
>
Received on Mon May 21 2012 - 21:11:33 CEST

This archive was generated by hypermail 2.2.0 : Mon May 21 2012 - 23:50:02 CEST