- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I downloaded and installed an evaluation copy of the ifort 11.1 fortran compiler. I wrote a very simple "hello world" program that I cannot manage to link. I am running in a virtual Windows XP box under VMWare on a Windows Vista host and get linker error
LNK1104: Cannot open file 'ifconsol.lib'.
I located several versions of this file and made sure that the path to one of them (Intel\\Compiler\\11.1\\060\\lib\\ia32) is included in the Lib environment variable. (I even went back to make sure that there was no confusion between 'zero' and the letter 'O' --- to no
avail.) What am I doing wrong?
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
You should see $(IFortInstallDir)lib\ia32 in the list. IFortInstallDir is created by the VS integration and won't be visible outside VS.
I assume that you installed into this virtual machine.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Ultimately, I am trying to build an open source C++ project under MSYS. The project uses some third-party code written in fortran, hence the need for ifort.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Y:> type test.f90
program test
print *,"Hello world"
stop
end program
Next the output:
Y:>ifort test.f90
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20100203 Package ID: w_cprof_p_11.1.060
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Microsoft Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
-out:junk.exe
-subsystem:console
junk.obj
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
Here is what happens if I use the /libdir: directive:
Y:>ifort test.f90 /libdir:c:\program files\Intel\Compiler\11.1\060\lib\ia32
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20100203 Package ID: w_cprof_p_11.1.060
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
ifort: command line error: Unrecognized keyword 'c:\program' for option '/libdir'
Using forward slashes did not help, either:
Y:>ifort test.f90 /libdir:/c/program files/Intel/Compiler/11.1/060/lib/ia32
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20100203 Package ID: w_cprof_p_11.1.060
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
ifort: command line error: Unrecognized keyword '/c/program' for option '/libdir'
What else can I try?
Thanks
gus gassmann
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
/link /libdir:"c\program files\Intel\Compiler\11.1\060\lib\ia32"
How did you start this command prompt session? Did you use the "Fortran Build Environment" shortcut installed by Intel Fortran?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
/link /libdir:"c\program files\Intel\Compiler\11.1\060\lib\ia32"
----
Here is what I did:
Y:>ifort junk.f90 /link /libdir:"c:\program files\Intel\Compiler\11.1\060\lib\ia32"
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20100203 Package ID: w_cprof_p_11.1.060
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Microsoft Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
-out:junk.exe
-subsystem:console
"/libdir:c:\program files\Intel\Compiler\11.1\060\lib\ia32"
junk.obj
LINK : warning LNK4044: unrecognized option
'/libdir:c:\program files\Intel\Compiler\11.1\060\lib\ia32'; ignored
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
As you can see, the quotes did not make a difference.
How did you start this command prompt session? Did you use the "Fortran Build Environment" shortcut installed by Intel Fortran?
No. It is a standard DOS command box. I am not sure what you mean by "Fortran Build Environment".
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
That is the one which has built in the paths which the installer came up with.
According to your results, your Windows global environment path settings for ifort may be messed up. You might want to correct or remove any references there, using the Windows System Properties > Advanced > Environment Variables (or equivalent, depending on your Windows version).
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Anyway, thanks again.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
The install does not modify the system LIB environment variable, as there are multiple build environments you might use. The best way to set up the environment, as Tim suggests, is to use the provided "Build Environment" shortcuts which set up everything as needed. For these, you need to specify whether you are building for IA-32 or Intel 64, and optionally, which VS version you want to use for its tools and libraries. For more information, please read the compiler documentation on Building Applications from the Command Line.
What I usually do is drag a copy of the shortcut I want to my desktop.

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable