views:

111

answers:

1

I can not get sdl up and running. I included the include folder, the library folder

and here is the code

#include <SDL.h>

int main() { if (SDL_Init(SDL_INIT_VIDEO)==-1) {

    return 1;
}

SDL_Quit();

return 0; }

what am i doing wrong?

It gives me this error message

Error   1   error LNK2019: unresolved external symbol _SDL_main referenced in function _main    c:\Users\user1\documents\visual studio 2010\Projects\Sdl Test 1\Sdl Test 1\SDLmain.lib(SDL_win32_main.obj)  Sdl Test 1
Error   2   error LNK1120: 1 unresolved externals   c:\users\user1\documents\visual studio 2010\Projects\Sdl Test 1\Debug\Sdl Test 1.exe    1   1   Sdl Test 1

EDIT: I got it working It is because I did not use this

int main(int argc, char* argv[])
+1  A: 

EDIT: I got it working It is because I did not use this

int main(int argc, char* argv[])

sdlUser