- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone, I am trying to compute the zero of a function using DZREAL(...) from the IMSL library with Fortran77. Unfortunately it gives me:
"error LNK2019: unresolved external symbol _DZREAL referenced in function _ELECTROCHEMICAL"
"fatal error LNK1120: 1 unresolved externals"
Here is a piece of my code:
SUBROUTINE ELECTROCHEMICAL (...)
USE ZREAL_INT
IMPLICIT REAL*4 (A-H,J-Z)
INTEGER ITMAX,NROOT
REAL*8 EPS,ERRABS,ERRREL,ETA
PARAMETER (NROOT=1)
INTEGER INFO(NROOT)
REAL*8 F,XGUESS(NROOT),X(NROOT)
EXTERNAL F
CALL DZREAL(F,ERRABS,ERRREL,EPS,ETA,NROOT,ITMAX,XGUESS,X,INFO)
END SUBROUTINE ELECTROCHEMICAL
FUNCTION F(X)
REAL*8 F,X
...
RETURN
END FUNCTION F
Anyone is able to explain me why things do not work?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you USE ZREAL_INT you are using the "F90 interface", which has you call ZREAL and the argument list may be different. See https://docs.roguewave.com/imsl/fortran/6.0/math/default.htm?turl=zreal.htm Your argument list is for the "F77 interface".
That said, the USE probably has no effect here since that module doesn't define DZREAL. Instead you have probably not linked to the IMSL libraries with the appropriate INCLUDE line in your main program.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page