Unresolved external symbol _SDL_Init . No SDL app will run on VS.

My simple code in VS2012:

1
2
3
4
5
6
7
8
9
#include "stdafx.h"
#include <SDL.h>
#undef main
int main( int argc, char ** argv )
{
    SDL_Init( SDL_INIT_EVERYTHING );
    SDL_Quit();
    return 0;
}

returns following errors:

1>ConsoleApplication21.obj : error LNK2019: unresolved external symbol _SDL_Init referenced in function _main
1>ConsoleApplication21.obj : error LNK2019: unresolved external symbol _SDL_Quit referenced in function _main

I have linked proper folders in project properties, added SDL.lib and SDLmain.lib to dependences, I have no idea what is wrong. Any advice?

Also, when I try to link the invalid for my system (x86) libraries, there are no linking errors, but program exits immidiately with code 0xc000007b.
Last edited on
Topic archived. No new replies allowed.