main.cpp: Define SDL_MAIN_HANDLED
According to the documentation [1], SDL.h defines `main` as a macro so as to perform automatic initialization and replaces the main function with `SDL_main`. In order to avoid this behaviour, the SDL_MAIN_HANDLED macro must be defined before including SDL.h. This commit solves link-time undefined references to `main`. [1]: https://wiki.libsdl.org/SDL2/SDL_SetMainReady git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9557 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: dc524d945dab929872060470a1073de283064883 Former-commit-id: e316320adb8e8697167f281a79968fd65af23327
This commit is contained in:
parent
121d1f14b6
commit
7ddb924550
2 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,8 @@
|
|||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#define SDL_MAIN_HANDLED
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#define SDL_MAIN_HANDLED
|
||||
|
||||
#include <portability.h>
|
||||
|
||||
#include <string>
|
||||
|
|
Loading…
Reference in a new issue