none
VC 2008 cannot open file 'kernel32.lib' RRS feed

  • 问题

  •  

    请大家帮我看看:
    我的环境是 xp+sp2

    我在编译 Microsoft Visual Studio 9.0\Samples\1033\AllVCLanguageSamples\C++\MFC\controls 下的任何一个项目时
    都会提示

    Error 1 fatal error LNK1104: cannot open file 'kernel32.lib' button


    当我把 Microsoft SDKs\Windows\v6.0A\Lib 目录添加到 Linker 中时又出现了更多的错误

    Linking...
      Creating library ia64\Debug/button.lib and object ia64\Debug/button.exp
    btnctl.obj : error LNK2001: unresolved external symbol CLSID_StockFontPage
    btnctl.obj : error LNK2019: unresolved external symbol __imp_LoadRegTypeLib referenced in function "[Entry] protected: virtual long __cdecl CButtonCtrl::GetTypeLib(unsigned long,struct ITypeLib * *)" (.?GetTypeLib@CButtonCtrl@@MEAAJKPEAPEAUITypeLib@@@Z)
    btnctl.obj : error LNK2019: unresolved external symbol __imp_OleTranslateAccelerator referenced in function "[Entry] public: virtual int __cdecl CButtonCtrl:Stick out tonguereTranslateMessage(struct tagMSG *)" (.?PreTranslateMessage@CButtonCtrl@@UEAAHPEAUtagMSG@@@Z)
    mfcs90d.lib(nolib.obj) : error LNK2019: unresolved external symbol __imp_SysFreeString referenced in function "[Entry] public: __cdecl ATL::CComBSTR::~CComBSTR(void)" (.??1CComBSTR@ATL@@QEAA@XZ)
    mfcs90d.lib(dllmodul.obj) : error LNK2001: unresolved external symbol __imp_SysFreeString
    mfcs90d.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp_SysFreeString
    mfcs90d.lib(oleexp.obj) : error LNK2001: unresolved external symbol __imp_SysFreeString
    mfcs90d.lib(dllmodul.obj) : error LNK2019: unresolved external symbol __imp_LocalFree referenced in function .RawDllMain
    mfcs90d.lib(dllmodul.obj) : error LNK2019: unresolved external symbol __imp_LocalAlloc referenced in function .RawDllMain
    msvcrtd.lib(crtdll.obj) : error LNK2019: unresolved external symbol __imp_Sleep referenced in function ._CRT_INIT
    msvcrtd.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_QueryPerformanceCounter referenced in function .__security_init_cookie
    msvcrtd.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetTickCount referenced in function .__security_init_cookie
    msvcrtd.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentThreadId referenced in function .__security_init_cookie
    msvcrtd.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentProcessId referenced in function .__security_init_cookie
    atlsd.lib(Externs.obj) : error LNK2001: unresolved external symbol __imp_GetCurrentProcessId
    ............

    ......
    2008年8月13日 14:20

答案

  • 你的编译设置是面向IA64的,需要64位的库。修改你的库文件搜索目录到Microsoft SDKs\Windows\版本号\Lib\IA64。
    2008年8月13日 15:18
    版主

全部回复