Linking *.so in a macro

so now i have (does not contain ROOT libs)
the de-facto code that uses the library is in t1.cpp. But to get it work, i actually load it from t0.cpp like this:

void t0(){
	gROOT->ProcessLine(".include ./someIncludePathAssociatedWithZzz/include/");
	gROOT->ProcessLine(".x t1.cpp"); // OK !

I tried several times to just load the library and include paths in t1.cpp without success. Am I doing something wrong ?

_ROOT Version:6.24.00
_Platform:conda (centos7)
_Compiler:GCC 9

in t1.cpp, use


// the de-facto code

Hi @NgJunKai,

Could you paste here the specific error output that you are getting in this case? Alternatively, could you attach a minimal reproducer?

As a (blind) workaround, I can suggest to try the following in t1.cpp:



actually the original code worked. but i need two macros for this…
then i found that the revised one (as in my own reply) also worked.

1 Like

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