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

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Call Subprograms from the Main Program on Windows

In mixed-language applications, an Intel® Visual Fortran main program can call subprograms written in a variety of languages. Conversely, an Intel® Visual 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® Visual 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® Visual Fortran, Intel® C++, Microsoft Visual C++* (unmanaged)

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

Dynamic Link Library (.DLL)

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

Intel® Visual 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® Visual Fortran (with interface generated by Fortran Module Wizard), .NET languages