J*****n 发帖数: 48 | 1 已经setup了环境:
source /usr/local/vni/CTT6.0/ctt/bin/cttsetup.csh
准备编译一个简单的C程序 a.c,里边调用了imsl fortran library
里的两个子程序,程序如下
#include
#include
//copied from some website...
main()
{
extern void rnnoa_();
extern float anordf_();
long int nr=5;
float r[5], p, x;
float one=1.0;
float zero = 0.0;
rnnoa_(&nr, r);
printf ("%f \n", r[0]);
x = .3;
p = anordf_ (&x);
printf ("%f \n", p);
}
gcc -c a.c $CFLAGS 通过
gcc -o a.out a.o $ |
|