Skip to content

Conversation

@BillyONeal
Copy link

"version.lib" is in the Windows SDK and provides Windows functions like GetFileVersionInfo. After we added a libversion port to vcpkg, we now see other ports fail to build as a result of this conflict. See for example:

SDL2-staticd.lib(SDL_windowskeyboard.c.obj) : error LNK2019: unresolved external symbol GetFileVersionInfoSizeA referenced in function IME_GetId
SDL2-staticd.lib(SDL_windowskeyboard.c.obj) : error LNK2019: unresolved external symbol GetFileVersionInfoA referenced in function IME_GetId
SDL2-staticd.lib(SDL_windowskeyboard.c.obj) : error LNK2019: unresolved external symbol VerQueryValueA referenced in function IME_GetId

microsoft/vcpkg#48066

The .pc file seems to only ever select a static version, so I used the static output name there.

"version.lib" is in the Windows SDK and provides Windows functions like `GetFileVersionInfo`. After we added a `libversion` port to vcpkg, we now see other ports fail to build as a result of this conflict. See for example:

```console
SDL2-staticd.lib(SDL_windowskeyboard.c.obj) : error LNK2019: unresolved external symbol GetFileVersionInfoSizeA referenced in function IME_GetId
SDL2-staticd.lib(SDL_windowskeyboard.c.obj) : error LNK2019: unresolved external symbol GetFileVersionInfoA referenced in function IME_GetId
SDL2-staticd.lib(SDL_windowskeyboard.c.obj) : error LNK2019: unresolved external symbol VerQueryValueA referenced in function IME_GetId
```

microsoft/vcpkg#48066

The .pc file seems to only ever select a static version, so I used the static output name there.
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Nov 7, 2025
@AMDmi3
Copy link
Member

AMDmi3 commented Nov 10, 2025

Sorry, I don't feel like accumulating hacks for windows here. The right place for these would be in windows package managers.

@AMDmi3 AMDmi3 closed this Nov 10, 2025
@BillyONeal
Copy link
Author

The right place for these would be in windows package managers.

To be clear, this isn't a Windows package conflicting with another Windows package. This is libversion conflicting with the Windows SDK. It's a conflict for all Windows customers, not only those using a package manager.

Normally we won't patch a library to rename it like this when upstream disagrees with it, so I think that leaves our only choice for vcpkg to either remove libversion from the index, or mark it "supports": "!(windows & static)". (The dynamic version makes libversion.lib rather than version.lib and thus does not conflict with the Windows SDK)

BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants