Commit 8177388e5ee6b42ee0f5cf2b7f1ec400251fac61

Sam Lantinga 2019-03-19T08:29:34

Fixed declaration of SDL_main_func for C++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/include/SDL_main.h b/include/SDL_main.h
index 658fd7c..7a17ede 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[]);