Fortran on X86 : Linker does not find an EQIVALENT in module
Posted: Thu Jun 15, 2023 2:37 am
See the following sample. the variable $GLOBAL$RGB is in the module in an equivalent statement, but the linker does not pick it up
Leaving out the EQUIVALENCE, it links just fine, but then my program will not work.. For the moment I do not have a work-around for this one.
Code: Select all
rumba-jj) f90/vers
VSI Fortran X8.5-0002 (GEM 50X2N) for X86 systems
rumba-jj) ty global.f90
module global
integer( kind = 1 ) :: rgb( 3 )
character ( len=1 ) :: rgb_ch( 3 )
!
equivalence ( rgb , rgb_ch )
!
end module global
15-JUN-2023 08:26:32
rumba-jj) ty test.f90
program test
use global
!
implicit none
!
! reset memory
rgb = 0
end
15-JUN-2023 08:26:39
rumba-jj) f90 global
rumba-jj) f90 test
rumba-jj) link test,global
%ILINK-W-NUDFSYMS, 1 undefined symbol:
%ILINK-I-UDFSYM, $GLOBAL$RGB
%ILINK-W-USEUNDEF, undefined symbol $GLOBAL$RGB referenced
section: $CODE$
offset: %X0000000000000027
module: TEST
file: $DISK0:[JOUKJ.test]TEST.OBJ;71