Can't get OpenGL to work with SDL2

No matter what I try, I get this error when trying to use any gl_ function in my code
error LNK2019: unresolved external symbol __imp__glClear at 4 referenced in function _SDL_main

Can anyone give me exact instructions how to set it up properly? When I google, the results either show tutorials for SDL 1.2 or use GLEW, is there even any point in using GLEW with SDL2? I thought all of the OpenGL context functionality is provided.

what is your link flag (-l) ?

GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform.

Afaik you need glew to get the function pointers from all opengl functions from the driver.
it is a bit out of scope of sdl to provide that as well.

Well, even with GLEW properly set up it does the same thing.

Fixed it by adding Opengl32.lib to additional libraries.