Re: No dictionaries for std::complex

From: Marcelo Zimbres <mzimbres_at_gmail.com>
Date: Mon, 21 May 2012 11:10:25 -0300


Hi Omar,

TComplex would work just fine, I have used it some time ago but I changed std::complex since I prefer to rely on standards, whenever possible. The workaround with gROOT->ProcessLine("#include <complex>"); fixes the issue, but it seems to me this is a Root bug, since I am using 5.32, as far as I know rootcint should deal with most of c++ standard library. Anyway, at the moment std::complex has spread into my code and I am not willing to revert all that to TComplex just to fix this problem.

Thanks,
Marcelo

2012/5/20 Omar Andrés Zapata Mesa <andresete.chaos_at_gmail.com>

> Hello Marcelo,
> try with TComplex instead, or do you need specifically std :: complex?
>
> Best wishes
>
> On Sat, May 19, 2012 at 9:54 PM, Marcelo Zimbres <mzimbres_at_gmail.com>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
>>
>>
>
>
> --
> Omar Andres Zapata Mesa
> Fundamental Interaction Phenomenology Gruop (Gfif)
> Head Developer
> http://gfif.udea.edu.co
> Gfif Developers (Gfif Dev)
> Division of computer science
> System Engineering Student
> Universidad de Antioquia At Medellin - Colombia
> Usuario Linux #490962
>
>
Received on Mon May 21 2012 - 16:10:35 CEST

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