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

Cannot compile fortran program via command line

GregClifft
Beginner
1,098 Views

I have Visual Studio 2017 and Intel PSXE 2020 installed (v15.9.64 and 19.1.2.254)

 

I am able to start Visual Studio and compile Fortran from inside of VS.  When I bring up the command line tools and try a simple compile, e.g.

 

ifort test.f

 

Then I get a link error after test.obj has been produced.  The link error is

 

LINK : fatal error LNK1104: cannot open file 'ImageHlp.lib'

 

I am assuming this is an issue with VS, and not PSXE, but not sure how to proceed.  Any advice would be appreciated.

 

Thanks!

 

 

0 Kudos
1 Solution
jimdempseyatthecove
Honored Contributor III
960 Views

I could not locate ImageHlp.lib in the current or older installations of Intel software installations.

 

In searching for ImageHlp.lib it appears that it appears to be part of Windows 

 

Try issuing from a command prompt

 

dir C:\ImageHlp.* /s/b

To see if both ImageHlp.lib and ImageHlp.dll are present on your system.

If not found, use the information in the link on Windows to try to resolve your issue.

If found, the path to the ImageHlp.lib would need to be added to either the environment or command line.

 

Jim Dempsey

View solution in original post

5 Replies
jimdempseyatthecove
Honored Contributor III
1,077 Views

Use the Start button, locate the Intel Parallel Studio group, inside there select the command prompt for Intel ....

This will setup the build environment variables.

 

Note, launching CMD from the Windows search will not setup the environment variables.

 

Jim Dempsey

GregClifft
Beginner
1,060 Views

yes, that is what I already did.  The environment is correctly established.  From the Start menu I chose "Compiler 19.1 Update 2 for Intel 64 Visual Studio 2017 environment" which opened a command prompt and called the setups.

0 Kudos
jimdempseyatthecove
Honored Contributor III
961 Views

I could not locate ImageHlp.lib in the current or older installations of Intel software installations.

 

In searching for ImageHlp.lib it appears that it appears to be part of Windows 

 

Try issuing from a command prompt

 

dir C:\ImageHlp.* /s/b

To see if both ImageHlp.lib and ImageHlp.dll are present on your system.

If not found, use the information in the link on Windows to try to resolve your issue.

If found, the path to the ImageHlp.lib would need to be added to either the environment or command line.

 

Jim Dempsey

jimdempseyatthecove
Honored Contributor III
959 Views

Also, consider updating your software to Intel oneAPI, it's free. And you may need to install Microsoft's Visual Studio Community Edition 2022 (with C++ development), this too is free.

 

Jim Dempsey

GregClifft
Beginner
888 Views

Unfortunately that is not an option in this instance, the Fortran compiler is being used with a 3rd party app, which won't work with Intel oneAPI.

0 Kudos
Reply