undefined reference to `derf'

undefined reference to `derf'

I compile others' codes ,I find it have a function below, I compile .......

Double Precision Function myderf(a)
Implicit None
Double Precision a
Double Precision derf
External derf


End Function myderf

I got errors

ze_i386.o: In function `myderf_':
ze_i386.f90:(.text+0x1b): undefined reference to `derf'
ze_i386.o: In function `myderfc_':
ze_i386.f90:(.text+0x3b): undefined reference to `derfc'

why ?  need  I  link something ?

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de mecej4

ERF, DERF and QERF are intrinsic functions, not external functions. Either change "External" to "Intrinsic" or comment out the statement altogether.

Similar remarks apply to ERFC.

I agree with mecej4.  external derf states that you will supply an implementation of derf and that you don't want to use the Fortran built-in (erf preferred).   Inclusion of erf in the Fortran intrinsic list is a relatively recent change, so you may still be able to find old compilers which prefer the way you have presented it (but you are then likely to need to link specifically against a library which provides derf).

Inicie sesión para dejar un comentario.