I am trying to make a shared library by typing in root seccion
.L TSU2Matrix.cxx+
than nothing happens untill you press Cntrl^C than compilation finishes and library is ready. Why do I need to press Cntrl^C?
If I try to use std::complex except TComplex in my class TSU2Complex I am not able to assign new values
std::complex a=std::complex(1,1).
If I use
typedef std::complex std_complex
and
add a line to TSU2ComplexLinkDef.h #pragma link C++ typedef std_complex;
it still doesn’t work
root [0] #include
root [1] .L libTSU2Matrix.so
root [2] TSU2Matrix M;
root [3] M.Print();
(0,0) (0,0)
(0,0) (0,0)
root [4] M(0,0)=std_complex(0.0,1.0);
Error: operator<< not defined for basic_ostream<char,char_traits >
FILE:_complex LINE:17
*** Interpreter error recovered ***
[quote]than nothing happens untill you press Cntrl^C than compilation finishes and library is ready. Why do I need to press Cntrl^C?
[/quote]
I can not reproduce this problem!
[quote]add a line to TSU2ComplexLinkDef.h #pragma link C++ typedef std_complex;
it still doesn’t work
[/quote]
The dictionary for std::complex is not provided in the ROOT build. So you need to explicitly generate it by simply adding the following line to your linkdef file: