Configuring Intel® Fortran in Microsoft* Visual Studio* to build Intel® MKL Applications

Submit New Article

November 8, 2008 10:30 AM PST


You can use Intel® Visual Fortran Compiler within Microsoft* Visual Studio* Integrated Development Environment (IDE) to develop Fortran applications. The following provides the information for linking your program with Intel® MKL from the Microsoft* Visual Studio* 2005/2008 and Intel® Fortran Compiler.

First, please make sure that Intel® Fortran Compiler is integrated within the Microsoft* Visual Studio* correctly.

In Microsoft* Visual Studio* environment, compiling and linking Intel® MKL with Intel® Fortan Compiler is similar as in Compaq Visual Fortran.

  • Create an Intel FORTRAN Project based on Intel® Math Kernel Library (Intel® MKL).
    Note: If you open one original "Compaq Visual Fortran project" in the Visual Studio .NET 2003 environment, it can be converted to Intel Fortran project automatically by a prompted window.
  • From the Visual Studio* 2005/2008 IDE main toolbar, select View » Solution Explorer, and make sure this window is active.
  • Select the Project in the Solution Explorer window, and then right-click the mouse and select Properties from the menu.
  • In Configuration Properties, select Fortran » General, and then in the Additional Include Directories item, add the Intel® MKL header files path as shown below(default: C:Program Files\Intel\MKL\10.1.0.018\include).

MKL_Fortran_Visual_studio_1.bmp

 

  • In Configuration Properties, select Linker » General, and then in the Additional Library Directories item, add the Intel® MKL Library path as shown below (default: C:Program Files\Intel\MKL\10.1.0.018\ia32\lib).

    MKL_Fortran_Visual_studio_2.bmp

  • Select Linker » Input, and then in Additional Dependencies add the Intel® MKL libraries as shown below(e.g. mkl_c.lib libguide40.lib). Please refer to section Linking Your Application with Intel MKL to find which Intel® MKL libraries are needed in your application.

MKL_Fortran_Visual_studio_3.bmp


Note:
For Intel® Fortran default setting, the mkl_c[_dll].lib is appropriate library to link. For Example: Compaq Visual Fortran, mkl_s[_dll].lib is right library to link.



Do you need more help?


This article applies to: Intel® Math Kernel Library Knowledge Base