Error: class,struct,union or type not defined

Hi, I had some code that was working, and seems to work in a reduced example, but I can’t figure out why the real code isn’t working anymore.

I am using ROOT 5.34/18, and trying to load the macro using “.L Foo.C+”.

If I try to load the file attached below (Verifier.C), it works fine. The real code has a few more things in it, and depends on other files, it is called MySpline2.C, when I try to .L it, I get this error:

[code].* ROOT v5.34/18 *

root [0] .L MySpline2.C+
Info in TMacOSXSystem::ACLiC: creating shared library /Users/jfcaron/Projects/Proto2BeamTest2/./
Error: class,struct,union or type MySpline2::CorrectionVerifier not defined MySpline2.C:706:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing /Users/jfcaron/Projects/Proto2BeamTest2/MySpline2_C_ACLiC_dict.cxx /Users/jfcaron/Projects/Proto2BeamTest2/MySpline2_C_ACLiC_dict.h !!!
Error: /Users/jfcaron/Software/custom_root/compiled/bin/rootcint: error loading headers…
Error in : Dictionary generation failed!
Info in : Invoking compiler to check macro’s validity
Info in : The compiler has not found any problem with your macro.
Probably your macro uses something rootcint can’t parse.
Check for Cint’s limitations.[/code]

The relevant parts are the final class called “CorrectionVerifier” at the very bottom, everything else can probably be ignored. Now I KNOW it’s not a CINT limitation, despite what the error message says, because the CorrectionVerifier class is identical in both files. So what’s causing this error? Is there a workaround? I need it to work with .L because I use it in PyROOT. Compiling separately with clang++ shows no problems.

Thanks for any advice.
MySpline2.C (26.1 KB)
Verifier.C (11.3 KB)

Try to move the static initializer for CorrectionVerifier::minimum_time outside the namespace MySpline2

} // End of namespace MySpline2
const double MySpline2::CorrectionVerifier::minimum_time = 0.01; // microseconds