Dear All:
I’ve tried to make my own class with root.
met some problem
see the source code below
if I run from root prompt, it’s OK
cx[000]:> #include "corT1.hh"
cx[001]:>
but if I run from root script file
p1.root
#include "CorT1.hh" // the header cannot write first??
void p1(){}
root p1.root
cause
Processing p1.cpp...
In file included from libtestIO dictionary payload:6:
/Users/xx/software/corsika/corsikainterface/rootbug/CorT2.hh:19:22: error: base class has incomplete type
class CorT2 : public CorT1 {
~~~~~~~^~~~~
libtestIO dictionary forward declarations' payload:5:117: note: forward declaration of 'CorT1'
class __attribute__((annotate("$clingAutoload$/Users/chenxu/software/corsika/corsikainterface/rootbug/CorT1.hh"))) CorT1;
^
In file included from libtestIO dictionary payload:6:
/Users/xx/software/corsika/corsikainterface/rootbug/CorT2.hh:22:12: error: only virtual member functions can be marked 'override'
~CorT2() override = default;
^~~~~~~~
...
I seem that I’ve to load the library first, then #include the header.
Q.E: Can I add the #include header
at the top of file?
_ROOT Version:6.35.01
_Platform:macos
source code:
maybe link:
Q.E: Can I add the #include "corT1.hh"
at the top of file?
as the code completer needs the header