I have a number of functions in a module, and I need one function to use other of the same module as the input of of a third function.
FUNCTION FUN2(W)
use gabqs, only: GABQ2
IMPLICIT REAL*8 (A-H,O-Z)
! REAL*8 W
EXTERNAL FUN3
R1 = 1.e-5
R2 = 10.e0
TOL = 1.E-2
CALL GABQ2(FUN3,R1,R2,SUM2,TOL,IER)
Fun2=sum2*W
RETURN
END
FUNCTION FUN3(R)
use dielectricFun, only: elflev
IMPLICIT REAL*8 (A-H,O-Z)
REAL*8 K,W
PI=3.1415926536
CALL elflev(w,k,r,ximelf)
fun3=ximelf*4.d0*pi*(r**2.d0)
RETURN
END
I can compile the module but when I compile the main program i get an error in the module where the two functions are:
.\integralfun.o:integralFun.F90:(.text+0x16c): undefined reference to `fun3_'
I have all the use statement in the main program.