Failing to compile macro under MacOS


ROOT Version: 6.14/04
Platform: MacOS 10.14.1
Compiler: Apple LLVM version 10.0.0 (clang-1000.11.45.5)


The following commands workroom the root prompt:

root [0] .L DData.c++
Info in TMacOSXSystem::ACLiC: creating shared library /Users/schutz/work/delphi/data/./DData_c.so
root [1] DData data
(DData &) Name: DData Title:

Doing the same in a macro:

#include <TSystem.h>
#include <TROOT.h>
#include

#include “./DData.h”

extern TROOT *gROOT;
extern TSystem *gSystem;

void DAna()

{
const Int_t kVerbose = 0;
if (!TClass::GetDict(“DData”)) {
gROOT->ProcessLine(".L DData.c++");

}
    std::cout << "DAna:......." << std::endl;
    DData data;

}

fails with the following link error error:

root [0] .x DAna.C
IncrementalExecutor::executeFunction: symbol ‘_ZN5DDataC1EP5TTree’ unresolved while linking [cling interface function]!
You are probably missing the definition of DData::DData(TTree*)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol ‘_ZN5DDataD1Ev’ unresolved while linking [cling interface function]!
You are probably missing the definition of DData::~DData()
Maybe you need to load the corresponding shared library?
root [1]

It all works well on Linux. Any idea what went wrong ?

Thanks … Yves

Hi Yves,

hard to say. Perhaps you can share the full macro so that I can reproduce?

Cheers,
D

PS
Are you running on Delphi data?

Thanks Danilo,

I attach the DData class definition. I checked that 1) it works on Linux 2) it works also on a Mac with a Mojave installation from scratch 3) it does not work on a Mac with a Mojave installation as an update of a previous version of the OS.

Yes I am running on Delphi data … Cheers, Yves
DData.h (5.1 KB)
DData.c (14.8 KB)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.