golosio / xrmc

17 stars 10 forks source link

Error when installing #51

Open darthyoda87 opened 2 years ago

darthyoda87 commented 2 years ago

I'm trying to install xrmc-6.4.1 and after "configure", which seems ok, when running "make" I get some errors:

composition.cpp:75:25: error: too few arguments to function 'double CS_Total(int, double, xrl_error)' 75 | MuAtom[i] = CS_Total(Z[i], E); // total cross section for atomic num. Z | ~~^~~ In file included from composition.cpp:25: /usr/local/include/xraylib/xraylib.h:152:8: note: declared here 152 | double CS_Total(int Z, double E, xrl_error error); | ^~~~ composition.cpp: In member function 'int phase::Delta(double)': composition.cpp:89:34: error: too few arguments to function 'double Fi(int, double, xrl_error)' 89 | double num = W[i]KD(Z[i]+Fi(Z[i],E)); | ^~ In file included from composition.cpp:25: /usr/local/include/xraylib/xraylib.h:253:8: note: declared here 253 | double Fi(int Z, double E, xrl_error error); | ^~ composition.cpp:90:32: error: too few arguments to function 'double AtomicWeight(int, xrl_error)' 90 | double denom = AtomicWeight(Z[i])EE; | ~~^~~~ In file included from composition.cpp:25: /usr/local/include/xraylib/xraylib.h:144:8: note: declared here 144 | double AtomicWeight(int Z, xrl_error error); | ^~~~ make[3]: [Makefile:404: libcomposition_la-composition.lo] Error 1 make[3]: Leaving directory '/home/urv/xrmc-6.4.1/src/composition' make[2]: [Makefile:450: all-recursive] Error 1 make[2]: Leaving directory '/home/urv/xrmc-6.4.1/src' make[1]: [Makefile:442: all-recursive] Error 1 make[1]: Leaving directory '/home/urv/xrmc-6.4.1' make: [Makefile:350: all] Error 2

Seems like some functions are defined different (number of arguments) in xraylib and in xrmc.

Is there any solution?

Thanks

tschoonj commented 2 years ago

Why would you install such an old version of XRMC? If you really need to do this (and I cannot think of a good reason why), you will need to use one of xraylib's older versions (<3.0.0, possibly even <2.0.0)

raeisim commented 1 year ago

I had similar errors too, when i want to compile detector_response program . I think these errors can be removed by replace the third argument , xrl_error pointer variable in called functions within source files with NULL pointer.