Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9840

Problem using static method in TF1 and TFormula

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 6.14/06, 6.17/01
    • 6.16/00, 6.14/10
    • Cling, Math Libraries
    • None
    • MacOSX Mojave with the ROOT master from 15/11/2018 or Ubuntu 16.04/18.04.

    Description

      The creation of a TF1 or TFormula using static method of a class from different library does not work. The error message isĀ 

      input_line_17:2:66: error: incomplete type 'AliTPCRF1D' named in nested name specifier
       ...TFormula____id11364701545931659720(Double_t *x){ return AliTPCRF1D::Gamm...
       ^~~~~~~~~~~~
      G__LibBase dictionary forward declarations' payload:5:65: note: forward declaration of 'AliTPCRF1D'
      class __attribute__((annotate("$clingAutoload$AliTPCRF1D.h"))) AliTPCRF1D;
       ^
      Error in <prepareMethod>: Can't compile function TFormula____id11364701545931659720 prototype with arguments Double_t*
       
      *** Break *** segmentation violation
      

      When both classes are in the same library, everything is fine. Adding a magic line

      gInterpreter->Declare("#include <AliTPCRF1D.h>");
      

      to the test macro "solves" the problem. Please see the README file in the reproducer for more details.

      Attachments

        Activity

          People

            axel Axel Naumann
            hristov Peter Hristov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: