Index: src/OFApplication.h ================================================================== --- src/OFApplication.h +++ src/OFApplication.h @@ -91,21 +91,26 @@ \ WINAPI int \ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, \ LPSTR lpCmdLine, int nShowCmd) \ { \ - extern void __getmainargs(int *, char ***, char ***, \ - int, int *); \ - extern int _CRT_glob; \ int argc = 0, si = 0; \ char **argv = NULL, **envp = NULL; \ \ __getmainargs(&argc, &argv, &envp, _CRT_glob, &si); \ \ return OFApplicationMain(&argc, &argv, \ (class_ *)[[class_ alloc] init]); \ } +# ifdef __cplusplus +extern "C" { +# endif +extern void __getmainargs(int *, char ***, char ***, int, int *); +extern int _CRT_glob; +# ifdef __cplusplus +} +# endif #endif #ifdef OF_HAVE_PLEDGE # define OF_HAVE_SANDBOX #endif