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

Cannot find ifconsol.lib

wteeters
Beginner
995 Views
I am trying to produce an executable of the usual "Hello world!" program below using the Intel Fortran 11.0.072 compiler.

program test
print *, 'Hello world!!!'
stop
end

The environment being used is the small Unix MSYS/MinGW environment which is installed under x64 Vista Ultimate on a Xeon chip. Microsoft Visual Studio 2008 is also installed. Other Fortran compilers thrive in this environment.

The results when trying to compile and link the Fortran code are:

[msys] /home/bill/Temp> ifort -o test.ext test.f
Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.0 Build 20090131 Package ID: w_cprof_p_11.0.072
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

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

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

This is very strange because this library is in the PATH and LIB variables.

[msys] /home/bill/Temp> which ifconsol.lib
/e/Intel-Fortran-11.0/Intel/Compiler/11.0/072/fortran/lib/ia32/ifconsol.lib

[msys] /home/bill/Temp> echo $LIB
E:\Intel-Fortran-11.0\Intel\Compiler\11.0\072\fortran\lib\ia32:/e/Microsoft Visual Studio 9.0/VC/lib

Can someone please help me to find a solution to this problem? Thanks.
0 Kudos
3 Replies
TimP
Honored Contributor III
995 Views
Quoting - wteeters
[msys] /home/bill/Temp> ifort -o test.ext test.f
Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.0 Build 20090131 Package ID: w_cprof_p_11.0.072
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

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

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

This is very strange because this library is in the PATH and LIB variables.

[msys] /home/bill/Temp> which ifconsol.lib
/e/Intel-Fortran-11.0/Intel/Compiler/11.0/072/fortran/lib/ia32/ifconsol.lib

[msys] /home/bill/Temp> echo $LIB
E:Intel-Fortran-11.0IntelCompiler11.0�72fortranlibia32:/e/Microsoft Visual Studio 9.0/VC/lib

2nd attempt to post a comment (my take on this):
Microsoft link doesn't understand the forward slashed paths.
I don't know whether msys (which some say is an obsolete fork from cygwin) behaves the same as cygwin. With cygwin, if you first open the ifort command window from the start menu, then execute the .bat file which starts up the new shell, you avoid this problem. You may need then to add the Microsoft linker path in ifort.cfg.
0 Kudos
Steven_L_Intel1
Employee
995 Views
You should not have to add the linker path in ifort.cfg - that isn't needed at all. Why it's there is a mystery to me.

It might be useful to add "-link -verbose" to the end of the ifort command line to see what the linker is seeing. I'm not at all familiar with this environment.
0 Kudos
TimP
Honored Contributor III
995 Views
You should not have to add the linker path in ifort.cfg - that isn't needed at all. Why it's there is a mystery to me.

It might be useful to add "-link -verbose" to the end of the ifort command line to see what the linker is seeing. I'm not at all familiar with this environment.
This is for the case where multiple active build environments causes ifort to invoke the wrong link when ifort.cfg isn't set up. That's not happening in the setup shown in this case, but I'm raising the possibility that changing the setup may fix the forward slash problem but raise the link path problem.
The multiple build environment case isn't supported by ifort, but there's usually a way to make it work so that ifort doesn't get sidetracked by the other environment.
There's also a possibility, when the library path is set up to the liking of Microsoft link, that the "foreign" shell will warn about the presence of the backslashed paths which we need for ifort/link.
0 Kudos
Reply