Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
47 Views

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

Jump to solution

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

Accepted Solutions
Black Belt Retired Employee
47 Views

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

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran

View solution in original post

0 Kudos
2 Replies
Black Belt Retired Employee
48 Views

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

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran

View solution in original post

0 Kudos
Highlighted
Beginner
47 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!

0 Kudos