Trying to compile example from intel fortran website using gfortran compiler
Trying to compile example from intel fortran website using gfortran compiler
(OP)
I am trying to compile the sample code provided in example 1 of [this link][1] using GNU Fortran. I have placed the source code in a .f95 file called "Test" and tried to compile it in `cmd` using
`gfortran test.95`
This throws quite a few errors as shown below:
C:\Program Files (x86)\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0>echo off
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>D;
'D' is not recognized as an internal or external command,
operable program or batch file.
C:\>D:
D:\>cd TEMP\FortranTest
D:\TEMP\FortranTest>gfortran test.f95
test.f95:8:20:
GENERIC :: READ (FORMATTED) => UDIO_READ_ARRAY
1
Error: Expected '=>' at (1)
test.f95:12:17:
INTERFACE WRITE(FORMATTED)
1
Error: Syntax error: Trailing garbage in INTERFACE statement at (1)
test.f95:13:21:
MODULE PROCEDURE UDIO_WRITE_ARRAY
1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
test.f95:14:5:
END INTERFACE
1
Error: Expecting END MODULE statement at (1)
test.f95:51:6:
USE TYPES
1
Fatal Error: Can't open module file 'types.mod' for reading at (1): No such file
or directory
compilation terminated.
D:\TEMP\FortranTest>
Why is this happening? How can I fix it?
[1]: https://software.intel.com/en-us/node/678729
`gfortran test.95`
This throws quite a few errors as shown below:
C:\Program Files (x86)\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0>echo off
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>D;
'D' is not recognized as an internal or external command,
operable program or batch file.
C:\>D:
D:\>cd TEMP\FortranTest
D:\TEMP\FortranTest>gfortran test.f95
test.f95:8:20:
GENERIC :: READ (FORMATTED) => UDIO_READ_ARRAY
1
Error: Expected '=>' at (1)
test.f95:12:17:
INTERFACE WRITE(FORMATTED)
1
Error: Syntax error: Trailing garbage in INTERFACE statement at (1)
test.f95:13:21:
MODULE PROCEDURE UDIO_WRITE_ARRAY
1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
test.f95:14:5:
END INTERFACE
1
Error: Expecting END MODULE statement at (1)
test.f95:51:6:
USE TYPES
1
Fatal Error: Can't open module file 'types.mod' for reading at (1): No such file
or directory
compilation terminated.
D:\TEMP\FortranTest>
Why is this happening? How can I fix it?
[1]: https://software.intel.com/en-us/node/678729
RE: Trying to compile example from intel fortran website using gfortran compiler
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm
RE: Trying to compile example from intel fortran website using gfortran compiler
???
MinGW is still actively supported as far as I know. The latest version for download is from 2013. That said, it isn't necessarily going to be compatible with code written for the Intel compiler.
awa5114 - have you checked that your compiler is working properly with a simpler example from the MinGW site?
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: Trying to compile example from intel fortran website using gfortran compiler
Sorry - take that back - gfortran doesn't currently fully support user defined IO.