- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I have two files that use the same COMMON block, but are in two different folders,
where do I put the INCLUDE file? (ex: INCLUDE "commonblock.inc" )
If I put it in folder A then the ones in folder B can't reference the INCLUDE text, likewise
if I put it in folder B, the ones in folder A can't see it when I compile them.
So is there some trick whereALL the routines can reference the same INCLUDE text file?
Does it belong in HEADERS or RESOURCES? If not there, then where?
I assume that the routines are in different project, but share a solution space.
Is there an article about this anywhere?
where do I put the INCLUDE file? (ex: INCLUDE "commonblock.inc" )
If I put it in folder A then the ones in folder B can't reference the INCLUDE text, likewise
if I put it in folder B, the ones in folder A can't see it when I compile them.
So is there some trick whereALL the routines can reference the same INCLUDE text file?
Does it belong in HEADERS or RESOURCES? If not there, then where?
I assume that the routines are in different project, but share a solution space.
Is there an article about this anywhere?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think that you have two possibilities:
1. Declare the include file using an absolute reference (full path to the file).
2. Move the common block declarations into a module by removing the common statement and adding the
module file into your project.
module file into your project.
Phil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting netphilou31
Hi,
I think that you have two possibilities:
1. Declare the include file using an absolute reference (full path to the file).
2. Move the common block declarations into a module by removing the common statement and adding the
module file into your project.
module file into your project.
Phil.
Now, for the other file or project, go to the fortran properties.
The second entry for "General" (that's Fortran \ General) you'll see "Additional Include Directories"
Add any directories where includes may be found (such as for the other project) besides the directory for this project. This way you don't need to put the full path in each file that uses the include, only here in the project properties.
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