Skip to content

Commit

Permalink
Fixed building with C++
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 19, 2019
1 parent 8177388 commit 03fc5ee
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions include/SDL_main.h
Expand Up @@ -86,12 +86,6 @@
#endif
#endif /* SDL_MAIN_HANDLED */

#ifdef __cplusplus
#define C_LINKAGE "C"
#else
#define C_LINKAGE
#endif /* __cplusplus */

#ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC
#endif
Expand All @@ -115,21 +109,18 @@
#define main SDL_main
#endif

#include "begin_code.h"
#ifdef __cplusplus
extern "C" {
#endif

/**
* The prototype for the application's main() function
*/
#ifdef __cplusplus
extern "C"
#endif
typedef int (*SDL_main_func)(int argc, char *argv[]);
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);


#include "begin_code.h"
#ifdef __cplusplus
extern "C" {
#endif

/**
* This is called by the real SDL main function to let the rest of the
* library know that initialization was done properly.
Expand Down

0 comments on commit 03fc5ee

Please sign in to comment.