- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Start the !DEC$ in column 1 (or 7). You have the ! in column 6 which makes it a continuation.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Start the !DEC$ in column 1 (or 7). You have the ! in column 6 which makes it a continuation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page