I recently upgraded from XE 2013 SP1 to XE 2015 (15.0.22) and with no changes to the code am getting LNK2001: unresolved external symbol errors from the Interface modules automatically generated by the compiler when using the -warn:all switch.
Hopefully attached is a code snippet showing the problem along with a batch file to compile with from the 64 bit command line.
The problem is relatively simple. My main program IPProc calls S/R AVERAGEIP
PROGRAM IPPROC
IMPLICIT NONE
CALL AVERAGEIP()
END
AVERAGEIP contains a S/R AVERMED which dimensions an array using a variable declared in AVERAGEIP
SUBROUTINE AVERAGEIP()
IMPLICIT NONE
INTEGER :: NRPTS
RETURN
CONTAINS
! even though this S/R is no longer called if I remove it the link error disapears
SUBROUTINE AVERMED()
REAL, DIMENSION(NRPTS) :: ZVEC
ZVEC = 0
RETURN
END SUBROUTINE AVERMED
END SUBROUTINE AVERAGEIP
The integer NRPTS is local to AVERAGEIP yet when I compile with-check:all -debug:full -traceback -warn:all I get the following error
ipproc.obj : error LNK2001: unresolved external symbol AVERAGEIP__GENMOD_mp_NRPTS
Which does not make sense. NRPTS is noted in the object code for IPPROC which also does not make sense.
Can you please confirm this is a bug and not something I am doing and advise on a patch.
Cheers
Kim