The command line build tools provided with LGF are different than those supplied with LF95, and their operation is completely different. LF95 largely used Microsoft tools to create executables, dlls and libraries, while LGF uses the GNU binutils to do the same. Unless the user wants to run these tools directly, this difference should not pose a problem, as the driver programs take care of all the details of invoking the correct tools.
LF95 largely conforms to Windows file naming conventions while LGF and GFortran use Linux file naming conventions for object files and libraries. This may cause problems with scripts or makefiles invoking LF95 that will need to be addressed by the user in order to obtain satisfactory operation with LGF. By default, LF95 produces object files with the “.obj” file extension, while LGF and GFortran produce object files having the “.o” file extension. LGF and GFortran both allow the user to explicitly specify the name of the object file with the –out and –o options, respectively. Both object and import library names produced by LF95 have the “.lib” extension. LGF and GFortran produce different file extensions for object and import libraries. Object libraries are given the extension “.a” while import libraries have the extension “.la”. These differences will only affect command-line users of LGF, users of Visual Studio are not affected, as all projects are automatically upgraded when opened with a new version of Visual Studio.
If there is no output executable name specified, the default behavior of LF95 is to name the executable after the first source file specified. The default behavior of both LGF and GFortran is to create an executable with the name “a.exe”.
As an extension, LF95 allowed the user to provide DLL IMPORT and DLL EXPORT attributes and statements in-code to specify a procedure as eligible for import or export to or from a DLL. When using LGF, procedures are specified using a code directive that is wrapped in a comment line. When porting LF95 source code that declares imports or exports, the extension attribute or statement will have to be removed and replaced with the directive. Any attempt to compile code containing the DLL xxPORT attribute will result in compilation errors.To summarize, code that looks like this:
As far as we know, it is not possible to statically link an LGF Fortran program with programs compiled by Microsoft Visual C. MSVC procedures can be called via DLL. When linking LGF Fortran programs with programs compiled with the companion GCC compiler, no special actions need to be taken to achieve a successful link, providing the calling conventions described in the documentation are followed, and the C object file is provided when linking the Fortran code. If the Fortran source code contains the LF95 ML_EXTERNAL attribute, this attribute will have to be removed or compilation errors will occur.