Search code examples
c++sdl-2

unresolved external symbol _SDL_main referenced in function _main_getcmdline


This is probably me being stupid but what am I doing wrong here? I'm not sure if I need the code but I'm doing this in Visual Studio 2019.


Solution

  • Are you sure you specified both assembly versions correctly in the linker? This means both for release and for debug.

    Considering that you are using VisualStudio2019, I strongly advise you to use vcpkg - this is a package management made by Microsoft that simplifies the installation of libraries and other features in 1 line =)

    Using it, you do not even need to enter the linker, and the official vcpkg website will help you configure it correctly.