Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Strange End-of-file errors while compiling.

Intel_C_Intel
Employee
534 Views
Ok, here is a short description of what I am trying to do. I am trying to convert a program that was writen for a Unix machine to run on a Windows machine. The program runs perfectly on the Unix but I am having problems now when the files are on the PC. I get an error for every file that I try to compile. It reads:

C:IRToolirtool_source_2.1.0oceanget_ocean_var_cm.f(5) : Error: Syntax error, found END-OF-FILE when expecting one of:
0 Kudos
2 Replies
sabalan
New Contributor I
535 Views
This looks like that the compiler can not find "END BLOCKDATA" before the end of file. If there is an "END BLOCKDATA" (or END Subroutine or END Program) in your code and you still get this error, and if you have a fixed format file, then maybe the continuation indicator of some line has appeared somewhere not at the 6th column (look for a "c" near a long line with stars), or it may depend on some "garbage" which has followed your file from Unix system: I have had "garbage" problems when I have copied files from VAX/VMS to DOS or Windows. A very long line with characters representing "page break" in VMS (some escape sequences?) appeared at the end of files. There are several "characters" which are not seen in DOS or Windows editors. My experience shows that in some cases just editing and resaving the ported file at the present OS solves the problem. Just remove something and rewrite it and save the file.

Regards,
Sabalan.
0 Kudos
Steven_L_Intel1
Employee
535 Views
I'm pretty sure I know what the problem is. You have an INCLUDE file named get_ocean_var_cm.f and you added it to your project as a "source file". That makes Developer Studio try to compile it as if it were a self-sufficient Fortran source, which it isn't.

Solution: In the FileView pane in Developer Studio, select all of your INCLUDE files and press the Delete key. This does not delete the file, but just removes them from the project's Source Files. Do Build..Update all dependencies. You should then see the INCLUDE files show up under "External Dependencies" and you can now build.

Steve
0 Kudos
Reply