This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Order of directory search for .mod files.
- From: David Ham <David dot Ham at imperial dot ac dot uk>
- To: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Thu, 05 Jun 2008 15:07:50 +0100
- Subject: Order of directory search for .mod files.
We have recently noticed that gfortran appears to pick up .mod files
from default locations in preference to directories specified by -I
arguments on the command line. So, for example, if foo.mod is in
/usr/include and foo.mod is in /home/bar/somedir and the user types:
gfortran -I/home/bar/somedir ...
then gfortran will pick up /usr/include/foo.mod . This causes particular
problems when the system gfortran distributed with the OS is, say, 4.2
and a user has installed gfortran 4.3 since nothing the user can specify
on the command line will prevent .mod files from installed packages
(generally compiled with 4.2) being used.
Is this the intended behaviour of gfortran or is this a bug?
Regards,
David
--
Dr David Ham
Applied Modelling and Computation Group,
Department of Earth Science and Engineering,
Imperial College London,
http://amcg.ese.ic.ac.uk/index.php?title=David_Ham