Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public
Document Table of Contents

Call Subprograms from the Main Program on Windows

In mixed-language applications, an Intel® Fortran main program can call subprograms written in a variety of languages. Conversely, an Intel® Fortran subprogram (including those contained within a DLL or static library) can be called from a main program written in another language.

Microsoft Visual Studio* projects support a single language; therefore, code for each language must exist in its own project.

This topic summarizes mixed language compatibility with Intel® Fortran for both managed code and unmanaged code. Managed code is architecture-independent code that runs under the control of the Microsoft* .NET Common Language Runtime Environment; unmanaged code is native, architecture-specific code.

Mixed-language applications can supply programs in a variety of formats:

Format Created By Callable By

Compiled objects (.OBJ) and static libraries (.LIB)

NOTE:

Objects and libraries must be link-compatible and not have conflicting names in their language support libraries

Intel® Fortran, Intel® C++, Microsoft Visual C++* (unmanaged)

Intel® Fortran, Intel® C++, Microsoft Visual C++ (unmanaged)

Dynamic Link Library (.DLL)

Intel® Fortran, Intel® C++, Microsoft Visual C++ (unmanaged), Microsoft Visual Basic* (unmanaged), many more

Intel® Fortran, Intel® C++, Microsoft Visual C++ (both managed and unmanaged), Microsoft Visual Basic (managed and unmanaged), many others

.NET managed code assembly

Microsoft Visual C++ .NET, Microsoft Visual Basic .NET, other .NET languages

Intel® Fortran (with interface generated by Fortran Module Wizard), .NET languages