I have some headaches with running a macro that have multiple functions defined…
the error (after a succesful aclic compilation) is of the form of :
aliroot: symbol lookup error: /home.hdd/adrian/work/jets-work/test_pPb/EmcalJetCDF_C.so: undefined symbol: Z18CreateAlienHandlerPKcS0_jjS0_S0_S0
where CreateAlienHandler is a function with the following signature (and forward declared)
AliAnalysisAlien* CreateAlienHandler ( const char* gridMode, const char* tag, unsigned int nr_test_files = 20, unsigned int TTL = 43200 , const char* outdir = “output”, const char* subworkdir = “”, const char* extradirlvl = “”);
I tried to load the .so generated by aclic in rootlogon and it shows in ListLibraries but i have the same error
Is there a catch to this?
Thanks a lot!
Adrian
forward declaring is not enough. When you forward declare, everything that uses the function compiles, but to link, the function needs to be defined in a library that ROOT has seen (=loaded).
Where is it defined exactly?
Is this file being compiled/loaded, e.g. by typing .L <fileWithDefinition.cxx>+ or by being linked into a library that’s being loaded?
Hi! It is just a macro that i run with root macro.C and it has multiple other functions… the thing is that when i chose another code path (that does not include this function) it works (so the other functions are found and used)
this is the macro EmcalJetCDF.C and i run it like this runGrid.sh
Thanks a lot!! By the way, how did you sow this? Just with optical recognition (and experience) or was something in the error that hinted towards the mismatch of the signatures?