Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

intel fortran missing libraries

dbpodrasky
Beginner
160 Views

Trying to compile a simple F90 MWE using intel fortran classic and MVSC build tools.

 

program test
    implicit none
    integer :: num
    num = 10
    print *, num
end program test

 

Trying to compile this within MSVC 2017 build tools command line using ifort throws a missing library error:

 

Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_000000
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.16.27045.0
Copyright (C) Microsoft Corporation. All rights reserved.

-out:fortranStandalone.exe
-subsystem:console
fortranStandalone.obj
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'

 

I have a win10 SDK installed. Is it possible it is not the "right" one? How would I know? Why are minGW and gfortran able to compile simple things out of the box and ifort with MSVC breaks right away?

 

I don't have MSVC IDE installed.

0 Kudos
1 Reply
Arjen_Markus
Valued Contributor III
125 Views

You mention MSVC build tools, but how do you start the command window? From the Intel Fortran menu item in the start menu? Could you show us the exact command-line, as well as the start-up messages from the command window? 

FYI, I start the environment via the menu item "Intel oneAPI command prompt for .." in the"Intel one API 2021" menu. The environment variables then get set to support the compiler to find the various libraries.

 

Reply