From 8177388e5ee6b42ee0f5cf2b7f1ec400251fac61 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 19 Mar 2019 08:29:34 -0700 Subject: [PATCH] Fixed declaration of SDL_main_func for C++ --- include/SDL_main.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/SDL_main.h b/include/SDL_main.h index 658fd7c1f..7a17ede87 100644 --- a/include/SDL_main.h +++ b/include/SDL_main.h @@ -118,7 +118,10 @@ /** * The prototype for the application's main() function */ -typedef C_LINKAGE SDLMAIN_DECLSPEC int (*SDL_main_func)(int argc, char *argv[]); +#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[]);