Re: Module compile order
- From: Thomas Robitaille <no@xxxxxxxx>
- Date: Sat, 31 May 2008 21:01:24 +0100
In article <1iht14g.5h5nqg1ic5cx0N%nospam@xxxxxxxxxxxxx>,
nospam@xxxxxxxxxxxxx (Richard Maine) wrote:
Thomas Robitaille <no@xxxxxxxx> wrote:
In a large project I have, two modules mutually depend on each other.
What is the best way to compile these?
The best way is to fix the code so that it conforms to the Fortran
standard. Such mutual module dependence is explicitly disallowed by the
standard. You can probably do various tricks to get it to work in some
compilers, but it is not standard, and there are probably compilers with
which you just won't be abe to make it work.
Any such tricks are definitely compiler-dependent.
Restructuring the code so that it doesn't have such mutual dependencies
can take a bit of work, its true. That's a subject that has been
discussed here before. The f2003 submodules TR can help with some of the
trickier cases if you happen to have a compiler that supports it. (I
think some already do support it, even though they don't yet support all
of f2003, but I'm not sure and don't have a list.)
Thanks for the advice! I wasn't aware that mutual dependencies were
disallowed, so this is certaintly good for me to know for future. I'll
restructure the code to avoid this.
.
- References:
- Module compile order
- From: Thomas Robitaille
- Re: Module compile order
- From: Richard Maine
- Module compile order
- Prev by Date: Re: Module compile order
- Next by Date: Re: warning on running image !!!!!
- Previous by thread: Re: Module compile order
- Next by thread: Re: Module compile order
- Index(es):
Relevant Pages
|
|