1

I'm having this error : "unresolved external symbol _main referenced in function ___tmaincrtstartup" just compiling this little code.

#include <iostream>
#include <SDL.h>


int main(int argc, char **argv)
{

    return 0;
}

The error pops only when I include SDL.h. I've already tried to go to Properties -> Linker -> System and change sub-system to console or windows same result.

What should I do ?

EDIT : Okay apparently this was due to the fact that I was using the SDL 32 bits instead of the 64. Now I'm having a warning but I should be able to fix it. Thanks anyway

Balta
  • 23
  • 1
  • 4

1 Answers1

1

You need to add both SDL.lib and SDLmain.lib to your linker.

Ch33f
  • 609
  • 8
  • 17