12.07.2015 Views

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 Mixed LanguageProgrammingLF64 code can call and be called by code written in certain other languages. With LF64 onecan create object and library files for use with the language systems in the table below. Callscan be made from Fortran to Fortran, from Fortran to another language, and from another languageto Fortran. If you are calling LF64 procedures from a language system other thanLF64, it may be necessary to refer to that language system’s documentation for moreinformation.What Is Supported<strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran supports mixed language interfaces to the following languagesand operating systems (this list is subject to change -- see READ_ML for any changes):Table 4: Compiler Support for Mixed LanguageLanguage System<strong>Linux</strong> kernel and standardC librariesGnu C--ml option(see below)--ml cdecl--ml cdeclDeclaring Your ProceduresIn order to reference a procedure across a mixed language interface, the LF64 compiler mustbe informed of the procedure name and told how to “decorate” this name as it appears in theobject file. These procedure names are defined with the ML_EXTERNAL statement (see“ML_EXTERNAL Statement” in the LF64 Language Reference). The DLL_EXPORT andDLL_IMPORT statements used in the LF64 Windows product are still supported, but theireffect is identical to ML_EXTERNAL since the calling conventions are the same for <strong>Linux</strong> staticand shared libraries.<strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong> 49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!