Hi All,
I recently met a problem with error message "error #6457: This derived type name has not been declared. [DRTYP]" in my code.
module derivetypetest implicit none !DEC$ IF DEFINED (abc) type StringPointer character (len=1), pointer :: sp end type StringPointer ! type drtyp integer dim, size integer (kind=IntKind), pointer :: array(:,:) end type drtyp !DEC$ ELSEIF DEFINED (def) type drtyp integer size integer (kind=IntKind), pointer :: array(:) end type drtyp ! character (len=1), private, allocatable :: whatever(:) !DEC$ ENDIF private :: drtyp type(drtyp), private:: drtyparr(5) end module derivetypetest
A workarround I used is that I put
private :: drtyp type(drtyp), private:: drtyparr(5)
in !DEC$ IF and !DEC$ ELSEIF.
May I ask if there's other option to keep the codes in the original form?