One way to reduce potential confusion when you use the same source code in several projects is to organize the routines into modules. There are two main uses for modules in Visual Fortran:
In this case, all the modules should be included in the main project directory. If many projects all share the same module, the module should reside in only one directory. All projects that use it should specify the /I compiler option to indicate the location of the module.
During the building of a project, the compiler scans the project files for dependencies. If you specify the /[no]include[path] (or /Ipath) command line option or the INCLUDE environment variable, the compiler is able to find the external modules.
Store precompiled module files, with the extension .MOD, in a directory included in the path. When the compiler sees the USE statement in a program, it finds the module based on the name given in the USE statement, so there is no need to maintain several copies of the same source or object code.
Modules are excellent ways to organize programs. You can set up separate modules for: