Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

error #5082: Syntax error, found '::' when expecting one of: (

lin_s_
Beginner
657 Views

I have a fortran program which contains several subroutines in seperate .for files. Right now I tried to transfer the fortran program into a dynamic link library.

I created a new dll, and define which subroutines can be called by external program. For one of the subroutines, when I add the sentence "!dec$ attributes dllexport::crsd04", and compile it, it showed the error "error #5082: Syntax error, found '::' when expecting one of: (" and "    Compilation Aborted (code 1)   "

The beginning of the program is as followed. In the following codes, there are "if..end if", "continue" and most are calculations. Thank you.

      subroutine crsd04(crskianrow0,crskianrow1,crsfae,crsrodf,crsxe135,
     &                  crssm149,crsrouc,crskiazoneij,crskcoeff,
     &                  crskcoeff1,crskcoeff2,crskrasig12,crskrasiga1,
     &                  crskrasiga2,crsdiff1,crsdiff2,crsnusigf1,
     &                  crsnusigf2,crssig12,crssiga1,crssiga2,crstf,
     &                  crskraxesiga1,crskraxesiga2,crskrasmsiga1,
     &                  crskrasmsiga2)
     
     !dec$ attributes dllexport::crsd04
    implicit none

    integer*4 :: crskiny=13
    integer*4 :: crskinz=11
      integer*4 :: i,j,k 
      real*8,DIMENSION(13) :: crskianrow0
      real*8,DIMENSION(13) :: crskianrow1
    real*8,DIMENSION(13,13,11) :: crsfae,crsrodf,crsxe135,crssm149
    real*8,DIMENSION(13,13,11) :: crsrouc
      integer*4,DIMENSION(13,13,11) :: crskiazoneij
      real*8,DIMENSION(9,7,3) :: crskcoeff
      real*8,DIMENSION(3,2,3) :: crskcoeff1,crskcoeff2
      real*8,DIMENSION(13,13,11) :: crskrasig12
      real*8,DIMENSION(13,13,11) :: crstf
      real*8,DIMENSION(13,13,11) :: crsdiff1,crsdiff2
      real*8,DIMENSION(13,13,11) :: crsnusigf1,crsnusigf2
      real*8,DIMENSION(13,13,11) :: crssig12,crsnusigf21,crskrasiga2
      real*8,DIMENSION(13,13,11) :: crssiga1,crssiga2,crskrasiga1

0 Kudos
1 Solution
Steve_Lionel
Black Belt Retired Employee
657 Views

Start the !DEC$ in column 1 (or 7). You have the ! in column 6 which makes it a continuation.

View solution in original post

2 Replies
Steve_Lionel
Black Belt Retired Employee
658 Views

Start the !DEC$ in column 1 (or 7). You have the ! in column 6 which makes it a continuation.

View solution in original post

lin_s_
Beginner
657 Views

Steve Lionel (Ret.) wrote:

Start the !DEC$ in column 1 (or 7). You have the ! in column 6 which makes it a continuation.

 

Thank you Steve, it works right now!

Reply