diff --git a/src/io_win.c b/src/io_win.c index 22d68af..5ed676b 100644 --- a/src/io_win.c +++ b/src/io_win.c @@ -43,7 +43,13 @@ #ifdef __MINGW32__ /* this prototype is missing from the mingw headers so we must add it or suffer linker errors. */ -WINHIDSDI BOOL WINAPI HidD_SetOutputReport(HANDLE, PVOID, ULONG); +# ifdef __cplusplus +extern "C" { +# endif + WINHIDSDI BOOL WINAPI HidD_SetOutputReport(HANDLE, PVOID, ULONG); +# ifdef __cplusplus +} +# endif #endif int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) {