This example demonstrates calling a C subroutine from Fortran, using the C interoperability features first introduced in Fortran 2003.

The C subroutine is in a static library project Clib. This is made a "dependent" project of the Fortran main project Fmain, which will cause the library to be automatically linked in with the Fortran main program.

System Requirements:
Build Instructions:

For Visual Studio IDE users:
  1. Open Visual Studio and load the solution .sln file
  2. Clean the solution from menu Build > Clean Solution
  3. Build the project from menu Build > Build Solution
  4. Run the application from menu Debug > Start Without Debugging or press Ctrl-F5

For Command line users:
  1. Open the Intel Visual Fortran Build Environment window from Start menu and navigate to the sample folder
  2. Use following commands to build and test:
    1. Clean the build folder use: build.bat clean
    2. To build a release version: build.bat release
    3. To build a debug version: build.bat debug
    4. To run the program: build.bat run
Notes: