Had the same problem, found this: vcpkg/integration.md at master · microsoft/vcpkg · GitHub
“For the vast majority of libraries, this is all you need to do – just File → New Project and write code! However, some libraries perform conflicting behaviors such as redefining main()
. Since you need to choose per-project which of these conflicting options you want, you will need to add those libraries to your linker inputs manually.”
Then it even lists SDL2 as an example, funny
So you need to add the correct paths for SDL2main.lib manually and also the file itself as linker input. The paths are depending on your configuration and platform
For example, the SDL2main.lib for Release|x64 is at vcpkg\installed\x64-windows\lib\manual-link