- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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?
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
/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?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
/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".
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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).
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Anyway, thanks again.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora