error with compilation of nr.f90


sarahf60
10-18-2013, 07:23 AM
Hi,
I should use MRQMIN subroutine in my code suitable for FORTRAN 90. Inside this subroutine there are some other modules " nrtype.90 " , " nrutil.f90 " and "nr.f90 " I'm compiling all these modules + my own code with these commands

ifort -c nrtype.90
ifort -c nrutil.f90
ifort -c nr.f90
ifort test.f90 nrtype.o nrutil.o nr.o -o test

but I'm receiving this error

/tmp/ifortcx4Tb3.o: In function `mrqmin_IP_mrqmin_private_':
test.f90:(.text+0x4041): undefined reference to `gaussj_'
test.f90:(.text+0x4896): undefined reference to `covsrt_'
test.f90:(.text+0x48a5): undefined reference to `covsrt_'
am I missing some thing here during the compilation?

davekw7x
10-26-2013, 07:38 AM
...
ifort -c nrtype.90
ifort -c nrutil.f90
ifort -c nr.f90
ifort test.f90 nrtype.o nrutil.o nr.o -o test
.
.
.
test.f90:(.text+0x4041): undefined reference to `gaussj_'
test.f90:(.text+0x4896): undefined reference to `covsrt_'
...
am I missing some thing here during the compilation?
You didn't compile gaussj.f90 or covsrt.f90.

I mean, the file nr.f90 has the interface definitions for these (and the other recipes functions), but the implementations are in the specific functions' .f90 files.


Regards,

Dave