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

后端 未结 13 2299
既然无缘
既然无缘 2020-12-05 10:07

I\'ve been getting this error ever since I installed the .NET Framework SDK for 64-bit programming on my Visual C++ 2010 Express compiler. I can\'t compile even a simple pro

13条回答
  •  猫巷女王i
    2020-12-05 10:52

    For command line (i.e. - makefile) users only:

    1. When you install VC++ Express, it is 32-bit only. So, things go into C:\Program Files (x86).
    2. Then, you decide to upgrade to 64-bit capabillities. So, you install the SDK. But it is 64-bit capable. So, things go into C:\Program Files.

    You (like me) probably "tuned" your makefile to #1, above, via something like this:

    MS_SDK_BASE_DOS := C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A
    ENV_SET         := LIB="$(MS_SDK_BASE_DOS)\Lib\x64"
    

    But, now, you need to change that tuning to #2, above, like this:

    MS_SDK_BASE_DOS := C:\Program Files\Microsoft SDKs\Windows\v7.1
    

    (Don't miss the "v7.0A" to "v7.1" change, as well.)

提交回复
热议问题