- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
myderf=derf(a)
Return
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 ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page