浏览代码

Fixed declaration of SDL_main_func for C++

Sam Lantinga 6 年之前
父节点
当前提交
8177388e5e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      include/SDL_main.h

+ 4 - 1
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[]);