C - SDL (Simple Directmedia Layer) - Errors

Here a list of errors from the SDL library.
These errors can be found from any circumstance, such as before compilation, after or during the linkage.

Error 1

Description    Resource    Path    Location    Type
undefined reference to `SDL_main'   
line 315, external location:
\Users\hercules\trunk\SDL-1.2\src\main\win32\SDL_win32_main.c
C/C++ Problem

To resolve this error on Windows, you have to pass the classic arguments int argc and char *argv[] to your main() function, just like this:

int main(int argc, char *argv[]) {
    return 0;
}

 

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.