- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,Everyone, I try to compile a fortran code in Microsoft VS .NET 2003 integrated with Intel Fortran compiler 9.0. When I built the solution, I have this error code for every subroutine which inclde the command " include'param.inc' " . Error: Cannot open include file 'param.inc'. I do add the 'param.inc' text file into the project.Also this 'param.inc'is in the same directory of my soure codes.Does anyone know what's the problem and how I can fix it? Thank you very much! Bei
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the forum.
I saw your thread in comp.lang.fortran about this, and you got some good initial advice there. Include files do not need to be added to the project, though it's handy to do so for editing and viewing.
By default, the compiler looks for include files in the same folder as the source file that had the INCLUDE line. You can specify additional include directories in the project properties. Could it be that you have misspelled the file name in the source?
I saw your thread in comp.lang.fortran about this, and you got some good initial advice there. Include files do not need to be added to the project, though it's handy to do so for editing and viewing.
By default, the compiler looks for include files in the same folder as the source file that had the INCLUDE line. You can specify additional include directories in the project properties. Could it be that you have misspelled the file name in the source?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for you advice.It's worked out! I should put the full name of the included file in the INCLUDE line.I mean I should write 'param.inc.txt ' instead of 'param.inc' in the INCLUDE line.Thanks again.I am a new comer for Fortran.Hope that I can learn a lot here.
And it seems I indeed:)
Bei
And it seems I indeed:)
Bei

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