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

fatal error LNK1104: cannot open file 'ifconsol.lib'

Dusan_Z_
Beginner
3,505 Views
Hello,

I am trying to build an application out of several source files. Compilation goes on OK, but at linking I keep getting the message:

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

and the linking halts.

Here what SET command gives:

SET Lib

LIB=C:Program FilesIntelCompilerFortran9.1EM64TLib;C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2LibAMD64;C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2LibAMD64atlmfc;

The ifconsol.lib file is located in:

C:Program FilesIntelCompilerFortran9.1em64tLib

So, why doesn't the compiler see this library?

Thanks.

0 Kudos
13 Replies
TimP
Honored Contributor III
3,505 Views
Are all the compilations using the 64-bit compilers, linker, etc, such that all .obj have the /machine:amd64 tag? The link program must be the one in the amd64 directory, with its path shown in Program FilesIntelCompilerFortran9.1EM64Tinifort.cfg.
0 Kudos
Dusan_Z_
Beginner
3,505 Views
No, I was not using this tag. But, I am not building an application for that platform, but for Pentium D EM64T. Should I put the tag anyway?
0 Kudos
Steven_L_Intel1
Employee
3,505 Views
I'd wonder which linker you're getting. Are you sure it's the EM64T linker? Do you have Visual Studio 2005 or the Platform SDK installed?
0 Kudos
Steven_L_Intel1
Employee
3,505 Views
Microsoft uses "AMD64" to identify the platform which is also supported by Intel processors with EM64T (now called "Intel 64") But that option is probably not what's causing this issue.

What's the full path to the linker being used and what's the complete output from the link?
0 Kudos
Dusan_Z_
Beginner
3,505 Views
Hi,

I am getting the output from the linker:

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

then I get the list of created object files and then at the end:

LINK: fatal error LNK 1104: cannot open file 'ifconsol.lib'
NMAKE: fatal error U1077: 'ifort' : return code '0x450'
Stop.

What should I do?

Thank you.

0 Kudos
Steven_L_Intel1
Employee
3,505 Views
Please post the link command used (get nmake to show you). Also, show the output of SET PATH.
0 Kudos
Dusan_Z_
Beginner
3,505 Views
Hi,

the output of SET PATH is:

Path=C:Program FilesIntelCompilerFortran9.1EM64TBin;C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2BinWin64x86AMD64;C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2Bin;C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2BinWinNT;C:Program FilesMicrosoft Visual StudioCommonTools;C:Program FilesMicrosoft Visual StudioCommonMsdev98BIN;C:Program FilesMicrosoft Visual StudioDF98BIN;C:Program FilesMicrosoft Visual StudioVC98BIN;C:PROGRA~1BorlandCBUILD~2ProjectsBpl;C:PROGRA~1BorlandCBUILD~2Bin;C:PROGRA~1BorlandCBUILD~1Bin;C:PROGRA~1BorlandCBUILD~1ProjectsBpl;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesCommon FilesAdobeAGL;C:PROGRA~1ULTRAEDT;c:matlabr12inwin32;C:FEKOin;C:FEKOInterOpcodein;C:Program FilesIntelCompilerFortran9.0IA32Bin;C:Program FilesIntelIDB9.0IA32Script;;C:Program FilesMathWorksMATLAB Component Runtimev73 untimewin32;C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2Binwin64;C:Program FilesMicrosoft Visual Studio .NET 2003Vc7in;C:Program FilesIntelCompilerFortran9.0EM64TBin;C:Program FilesIntelCompilerFortran9.0EM64TLib;C:Program FilesIntelCompilerFortran9.1IA32Bin;C:Program FilesI
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

and the link command is:

link
-out:wipler.exe
-subsystem:console
sx32w.lib
basel.obj
...
Spromeps.obj

and that's it.

Is this what you needed to see? I am not sure if gave you the right information.

Thanks.


0 Kudos
Steven_L_Intel1
Employee
3,505 Views
That looks ok. You might see if adding the /verbose switch to the link command gives any interesting additional information.
0 Kudos
Dusan_Z_
Beginner
3,505 Views
I tried to add this option but the compiler doesn't recognize it.

Can someone help with an advice what to do? This linker error is very frustrating.

Thanks.

0 Kudos
Steven_L_Intel1
Employee
3,505 Views
I assumed your makefile had a separate link command. To add it to ifort, precede it with /link and put it at the end.

If you need further help I suggest filing a support request with Intel Premier Support and include all the information I asked for here, including the "verbose" output.
0 Kudos
Dusan_Z_
Beginner
3,505 Views
Here is what I get with the /verbose option (during linking):

Starting pass 1
Processed /DEFAULTLIB:ifconsol
Processed /DEFAULTLIB:libifcore
Processed /DEFAULTLIB:libifport
Processed /DEFAULTLIB:libm
Processed /DEFAULTLIB:LIBC
Processed /DEFAULTLIB:libirc
Processed /DEFAULTLIB:OLDNAMES
Processed /DEFAULTLIB:bufferoverflowu
Processed /DEFAULTLIB:IFWIN.LIB
Processed /DEFAULTLIB:ADVAPI32.LIB
Processed /DEFAULTLIB:COMDLG32.LIB
Processed /DEFAULTLIB:GDI32.LIB
Processed /DEFAULTLIB:KERNEL32.LIB
Processed /DEFAULTLIB:LZ32.LIB
Processed /DEFAULTLIB:MPR.LIB
Processed /DEFAULTLIB:SHELL32.LIB
Processed /DEFAULTLIB:USER32.LIB
Processed /DEFAULTLIB:VERSION.LIB
Processed /DEFAULTLIB:WINMM.LIB
Processed /DEFAULTLIB:WINSPOOL.LIB
Processed /DEFAULTLIB:WSOCK32.LIB
Processed /DEFAULTLIB:iflogm.lib
Processed /DEFAULTLIB:comctl32.lib

Searching libraries
Searching sx32w.lib:
Found RNBOsproFormatPacket
Referenced in WIPLKEY.obj
Loaded sx32w.lib(sx32w.dll)
Found RNBOsproInitialize
Referenced in WIPLKEY.obj
Loaded sx32w.lib(sx32w.dll)
Found RNBOsproFindFirstUnit
Referenced in WIPLKEY.obj
Loaded sx32w.lib(sx32w.dll)
Found __IMPORT_DESCRIPTOR_sx32w
Referenced in sx32w.lib(sx32w.dll)
Referenced in sx32w.lib(sx32w.dll)
Referenced in sx32w.lib(sx32w.dll)
Loaded sx32w.lib(sx32w.dll)
Found __NULL_IMPORT_DESCRIPTOR
Referenced in sx32w.lib(sx32w.dll)
Loaded sx32w.lib(sx32w.dll)
Found sx32w_NULL_THUNK_DATA
Referenced in sx32w.lib(sx32w.dll)
Loaded sx32w.lib(sx32w.dll)
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'

Regards,
Drazen

0 Kudos
Steven_L_Intel1
Employee
3,505 Views
Does your makefile define a LIB variable? Can you build a "hello world" program from the command prompt (not using the makefile)?
0 Kudos
Dusan_Z_
Beginner
3,505 Views
Steve,

you are absolutely right. I do have a LIB variable in the makefile, and it is preventing the linker to "see" the correct library path. When I try to build a simple application with a makefile it doesn't work, but directly from command line it works!

I avoided using LIB variable in the makefile, and now I can build any project without error messages!

Thank you very much for your help!

Best regards,
Drazen

0 Kudos
Reply