Re: Auto-generated constructor (TRootIOCtor*)

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 18 Feb 2011 11:45:33 -0600


Hi,

This is the expected behavior given your code (the constructor taking TRootIOCtor does exist and has priority). See the work-around and details on the forum.

Cheers,
Philippe.

On 2/18/11 11:07 AM, OKUMURA, Akira wrote:
> Hello ROOTers,
>
> I have posted the same question at
> http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=12145
> But I have not received any reply yet. So let me send the same question to the mailing list.
>
> I wrote my class, TFitsKeyValue to read/write FITS files. When I run make command, ROOT uses unexpected constructor in a dictionary automatically.
>
> -------------------------------
> namespace ROOT {
> // Wrappers around operator new
> static void *new_TFitsKeyValue(void *p) {
> return p ? new(p) ::TFitsKeyValue( (TRootIOCtor*)0 ) : new ::TFitsKeyValue( (TRootIOCtor*)0 );
> }
> -------------------------------
>
> But since I have the default constructor in the class, such a constructor with TRootIOCtor* should not be called. Since I do not declare and define it in my code, the library causes an "undefined symbol error".
>
> How can I remove this problem? More detailed explanation is written at the phpBB3 page.
>
> - src/TFitsKeyValue.cxx
> http://root.cern.ch/phpBB3/download/file.php?id=5894
>
> - Makefile
> http://root.cern.ch/phpBB3/download/file.php?id=5893
>
> - inc/TFitsKeyValue.h
> http://root.cern.ch/phpBB3/download/file.php?id=5892
>
> - inc/LinkDef.h
> http://root.cern.ch/phpBB3/download/file.php?id=5891
>
> Regards,
>
> --
> OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
> Institute of Space and Astronautical Science (ISAS/JAXA)
> Now at KIPAC/SLAC/Stanford
> Varian Physics #306, 382 Via Pueblo Mall, MC 4060
> Stanford, CA 94305-4060
> TEL 650-736-0971/FAX 650-724-5065
> Skype : okumura.akira
>
Received on Fri Feb 18 2011 - 18:45:40 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 18 2011 - 23:50:01 CET