Problem using C++ library in fortran
I have three functions
(cm_angles, bh_cros_section, and int_part) which are in C++, and I need to call them in a FORTRAN program.
I have created shared libraries of these functions
and linked with FORTRAN program, and
in FORTRAN program I made a call e.g. "call cm_angles(arg1, arg2, ...)".
From the first sight these functions work correct,
and calculated values are correct also, but the
function int_part (only int_part), causes a problem.
The problem is:
after the first call of int_part, the call of random number
generator function (ranmar) in FORTRAN gives "NAN".
Without calling int_part ranmar works well.
If anyone want to look, the int_part and it's header file are attached.
The FORTRAN code consist of many files, and is
complicated, therefor I didn't attach it.
Any clue or idea about this?