Visual Studio error: LNK1104: cannot open file 'kernel32.lib' - only in WP8 projects / Win32 builds

前端 未结 1 716
南方客
南方客 2020-12-18 04:26

I ran into this problem recently (few days ago everything was working fine): Visual Studio 2012 started to refuse to build native WP8 projects.

Today, I created new

相关标签:
1条回答
  • 2020-12-18 05:14

    Finally, I have found the reason of my problems: as I suspected, internal Visual Studio configuration has been broken.

    I did all standard steps, that can be performed in case of LNK1104, however:

    - kernel32.lib was in valid location
    - all include and library directories was correct
    - standard *.props files were attached to each project
    

    However, the cause was lying elsewhere.

    All paths are defined using standard macros. One of them is $(WindowsSDK80Path), which is used to build include/library paths. On my system, this macro was defined as

    C:\Program Files (x86)\Windows Phone Kits\8.0
    

    instead of

    C:\Program Files (x86)\Windows Kits\8.0
    

    And that's it. I do not know, when or how, this problem arosed. Visual Studio repair via orginal installer was sufficient method to fix everything. All projects compile now without any problems.

    0 讨论(0)
提交回复
热议问题