TClingCallFunc error

I am running a code on :


| Welcome to ROOT 6.02/02 root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From tag v6-02-02, 26 November 2014 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

But getting an error while executing command : root masterclass.C

root [0]
Processing masterclass.C…
Rint:/
root [1] IncrementalExecutor::executeFunction: symbol ‘_Z9alice_vsdiii’ unresolved while linking symbol’__cf_4’!
Error in TClingCallFunc::make_wrapper: Failed to compile
==== SOURCE BEGIN ====
attribute((used)) extern “C” void __cf_4(void* obj, int nargs, void** args, void* ret)
{
((MasterClassFrame*)obj)->StartExample();
return;
}

==== SOURCE END ====
Error in <TClingCallFunc::Exec(address, interpVal)>: Called with no wrapper, not implemented!

I have tried looking at .h files of TCling but could not resolve the issue. I have no clue what exacly this code means. I checked some other posts but could not find the solution. If you want any additional information then please let me know.

Is this a bug in root ?

Thank you.

Hi,

It means ROOT cannot find the definition of alice_vsd(int, int, int) - it might be in a library that you forgot to load. It’s likely referenced / called by MasterClassFrame::StartExample() - you might could look at its code.

If none of that helps please post masterclass.C.

Cheers, Axel.

[quote=“Axel”]Hi,

It means ROOT cannot find the definition of alice_vsd(int, int, int) - it might be in a library that you forgot to load. It’s likely referenced / called by MasterClassFrame::StartExample() - you might could look at its code.

If none of that helps please post masterclass.C.

Cheers, Axel.[/quote]

Hi,

Code for masterclass.C :

#include <TApplication.h>
#include <TGClient.h>
#include <TGButton.h>
#include <TGListBox.h>
#include <TGComboBox.h>
#include <TList.h>

class MasterClassFrame : public TGMainFrame {

private:

TGTextButton *fExample;
TGTextButton *fStudent;
TGTextButton *fTeacher;
TGTextButton *fExit;
Int_t fChoice;
Int_t fMode;
TGComboBox *fDataset;

public:

MasterClassFrame(const TGWindow *p, UInt_t w, UInt_t h);
virtual ~MasterClassFrame();
void Start();
void StartExample();
void StartStudent();
void StartTeacher();

ClassDef(MasterClassFrame, 0)
};

void MasterClassFrame::Start()
{

#if defined(CINT) && !defined(MAKECINT)
{
Info(“alice_vsd.C”, “Has to be run in compiled mode … doing this for you.”);
gSystem->CompileMacro(“alice_vsd.C”);
alice_vsd(fChoice, fMode, fDataset->GetSelected());
}
#else
alice_vsd(fChoice, fMode, fDataset->GetSelected());
#endif

UnmapWindow();

}

void MasterClassFrame::StartExample()
{

fChoice = 1;
fMode = 1;

Start();

}

void MasterClassFrame::StartStudent()
{

fChoice = 2;
fMode = 2;

Start();

}

void MasterClassFrame::StartTeacher()
{

fChoice = 2;
fMode = 3;

Start();

}

MasterClassFrame::MasterClassFrame(const TGWindow *p, UInt_t w, UInt_t h) :
TGMainFrame(p, w, h)
{

TGVerticalFrame* hf = new TGVerticalFrame(this);
{

  TGLabel* label = new TGLabel(hf,"MasterClass");
  hf->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));

  TGPictureButton* b1 = new TGPictureButton(hf, gClient->GetPicture("eve_files/ALICE_logo.png"));
  hf->AddFrame(b1, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));

  fExample = new TGTextButton(hf,"Demo");
  hf->AddFrame(fExample, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
  fExample->Connect("Clicked()", "MasterClassFrame", this, "StartExample()");

  fStudent = new TGTextButton(hf,"Student");
  hf->AddFrame(fStudent, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
  fStudent->Connect("Clicked()", "MasterClassFrame", this, "StartStudent()");

  fTeacher = new TGTextButton(hf,"Teacher");
  hf->AddFrame(fTeacher, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
  fTeacher->Connect("Clicked()", "MasterClassFrame", this, "StartTeacher()");
  
  fDataset = new TGComboBox(hf);
  fDataset->AddEntry("dataset 1", 1);
  fDataset->AddEntry("dataset 2", 2);
  fDataset->AddEntry("dataset 3", 3);
  fDataset->AddEntry("dataset 4", 4);
  fDataset->AddEntry("dataset 5", 5);
  fDataset->AddEntry("dataset 6", 6);
  fDataset->AddEntry("dataset 7", 7);
  fDataset->AddEntry("dataset 8", <img src="/uploads/default/original/1X/fe5f42ae79e389360ae9d969db4dcc4bca03d384.gif" width="15" height="17" alt="8)" title="Cool"/>;
  fDataset->AddEntry("dataset 9", 9);
  fDataset->AddEntry("dataset 10", 10);
  fDataset->AddEntry("dataset 11", 11);
  fDataset->AddEntry("dataset 12", 12);
  fDataset->AddEntry("dataset 13", 13);
  fDataset->AddEntry("dataset 14", 14);
  fDataset->AddEntry("dataset 15", 15);
  fDataset->AddEntry("dataset 16", 16);
  fDataset->AddEntry("dataset 17", 17);
  fDataset->AddEntry("dataset 18", 18);
  fDataset->AddEntry("dataset 19", 19); 
  fDataset->AddEntry("dataset 20", 20);
  fDataset->AddEntry("dataset 21", 21);

  fDataset->Resize(100,20);
  fDataset->Select(1,kFALSE);
  hf->AddFrame(fDataset, new TGLayoutHints(kLHintsExpandX));

  fExit = new TGTextButton(hf,"Exit");
  hf->AddFrame(fExit, new TGLayoutHints(kLHintsExpandX, 5, 5, 10, 10));
  fExit->Connect("Clicked()", "TApplication", gApplication, "Terminate()");

}

AddFrame(hf);

SetWindowName(“MasterClass”);
MapSubwindows();

Resize(GetDefaultSize());

MapWindow();

}

MasterClassFrame::~MasterClassFrame()
{

Cleanup();

}

void masterclass()
{

gROOT->pwd();

new MasterClassFrame(gClient->GetRoot(), 400, 200);

TRootHelpDialog* instructions = new TRootHelpDialog(gClient->GetRoot(), “MASTERCLASS MENU INSTRUCTIONS”, 700, 250);

instructions->SetText(“
Welcome to ALICE Masterclass!\n\n

You see the window .There are 4 buttons to your disposal\n
Using these buttons, one can choose the mode:\n\n
Demo - starts a demo of MasterClass exercise with 4 events to analyse\n

Student - starts MasterClass with 100 real events for you to analyze\n

Teacher - starts Masterclass with Teacher tools that allow to summarise\n
the students results and draw conclusions from the analysis\n\n

The button quits MasterClass application\n\n

NOTE: after you click or , it takes about 30 seconds to start\n
the application\n\n

”);

instructions->Popup();

}

I have tried adding .h file by command : root [10] .include /home/kdkulkarni93/root-src/root-6.02.02/graf3d/eve/inc
etc.

now error shows as follows :

In file included from input_line_101:1:
/home/kdkulkarni93/scratch/alicemasterclass/mc2013/masterclass.C:42:7: error: use of undeclared identifier
’alice_vsd’
alice_vsd(fChoice, fMode, fDataset->GetSelected());
^

alice_vsd is defined in alice_vsd.C

Thank you.

Hi,

On the top of your file, next to the other includes, add

#include “alice_vsd.C”

Cheers, Axel

[quote=“Axel”]Hi,

On the top of your file, next to the other includes, add

#include “alice_vsd.C”

Cheers, Axel[/quote]

I added #include “alice_vsd.C”

It is still showing following error :

root [3] .x masterclass.C
In file included from input_line_53:1:
In file included from /home/kdkulkarni93/scratch/alicemasterclass/mc2013/masterclass.C:7:
./alice_vsd.C:17:10: fatal error: ‘TGLOverlayButton.h’ file not found
#include <TGLOverlayButton.h>
^

The file is in directory : /home/kdkulkarni93/root-src/root-6.02.02/graf3d/gl/inc

I tried to add the path from following cling command :
root [4] .include /home/kdkulkarni93/root-src/root-6.02.02/graf3d/gl/inc

Problem still persists ! :question:

Will it have a same effect if I include alice_vsd.h instead of alice_vsd.C in masterclass.C?

Thank you.

Problem is solved !!! I was using wrong root version. Thanks for support ! :slight_smile: