- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Ulf Ekstrom,
VU University Amsterdam
Error message from trying to compile an empty file:
ifort -c empty.F
fortcom: Error: empty.F, line 3: Syntax error, found END-OF-FILE when expecting one of:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The handling of this changed beginning with our 9.1.040 release, where empty source files no longer produce the error you received.
My example test.F contains a single blank line.
$ ifort -V -c test.F
Intel Fortran Compiler for 32-bit applications, Version 9.1 Build 20061103Z Package ID: l_fc_c_9.1.040
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
Intel Fortran 9.1-6470
The easiest resolution is to upgrade to at least 9.1.040.
To use compilers prior to 9.1.040, you will need to provide some form of stub subprogram. Or perhaps another alternative, if your source file is empty or contains less than two lines (which would account for a SUBROUTINE/FUNCTION plus END statements), is to condition the actual compilation in your simple build system based on checking the number of lines in the source file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ulf Ekstrom
VU University Amsterdam
![](/skins/images/98E68944C1FF703B8AC50091329B92AF/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page