- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to compile code I have written, using both ifort and gfortran. The problem I am having is relating to my use of the preprocessor and directory structure.
In my fortran source I have something like:
#include "includes/myinclude1.inc"
In "includes/myinclude1.inc" I want to include another file, say "includes/sub/myinclude2.inc".
In ifort the preprocessor uses the directory relative to the source directory, so in "includes/myinclude1.inc" I may just do:
#include "includes/sub/myinclude2.inc"
However, in gfortran it is relative to the location of the current include file, so I instead must do:
#include "sub/myinclude2.inc"
Is there a compiler option (either in ifort or gfortran) that will allow me to get the same behavior across compilers?
Thanks.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not yet fixed, but is being worked on. explicitly specifying -source-include is a workaround.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »