- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can expand the include files (.inc) into your .f90 source files using #include (with -fpp) or the Fortran INCLUDE statement.
For example, your test.f90 might contain:
program sample
INCLUDE test.inc
--or--
#include "test.inc"
end
And perhaps test_dist_int.f90 might contain:
subroutine test_dist_int()
INCLUDE diagnostic.inc
-- or --
#include "diagnostic.inc"
return
end
To compile when using the INCLUDE form, use: ifort test_dist_int.f90 main.f90
To compile when using the #include form, use: ifort -fpp test_dist_int.f90 main.f90
If any of the .inc or .f90 source files include macros requiring preprocessing, then you can use either the INCLUDE or #include form shown above but you must add the -fpp compiler option to expand the macros.
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page