Re: [ROOT] How to Call CERNLIB routines from the interpreter

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Mon Dec 18 2000 - 10:02:41 MET


>  However  why did do that?  I wonder it would take you the same 
>  amount of time to apply f2c and make the final  C++ code up.
Not really.
I was asked to provide an interface to some CERNLIB functions. Maybe
tomorrow I will be asked to do it for some other functions ?
The time spent on rewriting the code in C (even using f2c) would be much
longer then just writing a couple of lines of "glue" code.
Anyhow, I've spent most of the time trying to provide an interface between
compiled and interpreted code (mainly because of some CINT problems, the
most nasty being in G__isinterpretedp2f). This would NOT disappear even if
the source code was in C.

>  On another hand your example is good for some UNIX systems only.
>  It does take in account only one kind of "FORTRAN subroutine name 
>  mangling schema".
Well, typically it's just appending an underscore, or not. This is taken
into account by "#ifdef extname" in the CERNfunctions.cxx file (one needs
to add "-Dextname" while compiling, or not - this should be taken
automatically into account in the Makefile).

>  I think this should mentioned on ROOT Web site. Otherwise the Windows
>  users will be confused again.
I'm sorry for these people, but ... this is just one reason more to
delete FAT partitions and replace them with some ext2 ones.
Well, I don't know how the Windose screws things up. If you know how to
unscrew it, please modify the CERNfunctions.cxx file adding something like
"#if Windose" "#define rrkstp ...(windosename)..." ... .
Moreover, if there are people who try to use this example on different
platforms and notice improper compiler/linker flags in the Makefile,
please feel free to modify them.
Jacek.



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:39 MET