none
Itanium. Fatal error LNK1181: cannot open input file 'kernel32.lib'

    Question

  • Hello,

     

    I've VisualStudio Team System 2008 installed with 64-bit support.

     

    I try to compile a trivial (main() only) test application for the Itanium platform but I get the following linker error:

     

    LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'

     

    I'm disconcerted as the same build works ok for the x64 platform.

     

    I've checked the $(VCInstallDir)lib\ia64 folder and it seems correct, it has 57 files, the same as the $(VCInstallDir)lib\amd64 folder.

     

    Any help will be appreciated, thanks.

     

    Follows the Itanium build output:

     

    1>------ Rebuild All started: Project: Test1, Configuration: Release Itanium ------

    1>Deleting intermediate and output files for project 'Test1', configuration 'Release|Itanium'

    1>Compiling...

    1>Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for Itanium

    1>Copyright (C) Microsoft Corporation. All rights reserved.

    1>cl /O2 /Oi /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_ATL_STATIC_REGISTRY" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy /Yc"stdafx.h" /Fp"Itanium\Release\Test1.pch" /Fo"Itanium\Release\\" /Fd"Itanium\Release\vc90.pdb" /W3 /c /Zi /TP .\stdafx.cpp

    1>stdafx.cpp

    1>Compiling...

    1>Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for Itanium

    1>Copyright (C) Microsoft Corporation. All rights reserved.

    1>cl /O2 /Oi /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_ATL_STATIC_REGISTRY" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy /Yu"stdafx.h" /Fp"Itanium\Release\Test1.pch" /Fo"Itanium\Release\\" /Fd"Itanium\Release\vc90.pdb" /W3 /c /Zi /TP .\Test1.cpp

    1>Test1.cpp

    1>Linking...

    1>Microsoft (R) Incremental Linker Version 9.00.21022.08

    1>Copyright (C) Microsoft Corporation. All rights reserved.

    1>"/OUT:c:\TEMP\Test1\Itanium\Release\Test1.exe" /INCREMENTAL:NO /MANIFEST "/MANIFESTFILE:Itanium\Release\Test1.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:c:\TEMP\Test1\Itanium\Release\Test1.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:IA64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

    1>".\Itanium\Release\stdafx.obj"

    1>".\Itanium\Release\Test1.obj"

    1>LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'

    1>Build log was saved at "file://c:\TEMP\Test1\Test1\Itanium\Release\BuildLog.htm"

    1>Test1 - 1 error(s), 0 warning(s)

    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    Wednesday, February 20, 2008 11:50 AM

Answers

  •  

    I've found the problem, I wasn't looking at the  correct LIB folder.

     

    The library kernel32.lib should be at:

     

    (Program Files Folder)\Microsoft SDKs\Windows\v6.0A\Lib\IA64 

     

    but this folder doesn't exits.

     

    In my computer I've kernel32.lib for IA64 at:

     

    (Program Files Folder)\Microsoft SDKs\Windows\v5.0\Lib\IA64 

     

    But I don't know if this is a setup issue or if I need to change some setting in Visual Studio in order to compile for the Itanium platform.

     

     

    Wednesday, February 20, 2008 12:10 PM