Silverfrost Forums

Welcome to our forums

.MOD files

28 Dec 2006 6:11 #1495

Dear users of FTN95,

I am a new user of FTN95 (personal edition) and have at the moment the following problem:

In the documentation one finds the statement that FTN5 looks for .MOD (MODULE) files in the current directory, then in the directory named in the MOD_PATH environment variable, then in the directory named in the /MOD_PATH option.

My question is: How can one build a .MOD file from a Fortran file (.FOR, .f90, .f95) a) from within Plato 3, b) if this should not be possible, from the command line?

With thanks for your help and best wishes,

Wolfgang Höppner.

29 Dec 2006 9:29 #1496

.MOD files (one for each MODULE) are automatically created when a source file (containing MODULEs) is compiled. This is in addition to the .OBJ file that the compiler creates.

The .MOD files contain header information that is needed by the compiler whenever a USE statement appears in the code. The .OBJ files (not the .MOD files) are used at link time to create the executable, LIB or DLL.

14 Nov 2007 3:30 #2438

Hi Paul,

when I set the environment variable mod_path the compiler finds the modules I specified with the USE statement. But where does the compiler search for the .obj files when I link the program.

My project is handled with Plato. When linking the error is as follows: \win32\<objectfile.obj> does not exist. This happens altough the .mod and .obj files are in the directory specified by mod_path.

I think the solution is very simple. However, it is difficult to understand the use of libraries and especially the implementation of them. A simple example in the documentation will be very helpful.

Jacques

Please login to reply.