From c6cc3b8d90226af9997d6e81b548e9f6c27aba37 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 29 Nov 2014 21:18:45 +0100 Subject: [PATCH] CXX_BUILD - Fix some undefined reference linker errors --- audio/dsp_filter.h | 8 ++++++++ autosave.h | 8 ++++++++ cheats.h | 8 ++++++++ input/input_common.h | 7 ++++--- libretro-sdk/include/gfx/scaler/filter.h | 8 ++++++++ libretro-sdk/include/gfx/scaler/scaler.h | 8 ++++++++ movie.h | 8 ++++++++ retro.h | 8 ++++++++ rewind.h | 8 ++++++++ 9 files changed, 68 insertions(+), 3 deletions(-) diff --git a/audio/dsp_filter.h b/audio/dsp_filter.h index 8d5a225e77..7b9497166d 100644 --- a/audio/dsp_filter.h +++ b/audio/dsp_filter.h @@ -16,6 +16,10 @@ #ifndef RARCH_DSP_FILTER_H__ #define RARCH_DSP_FILTER_H__ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct rarch_dsp_filter rarch_dsp_filter_t; rarch_dsp_filter_t *rarch_dsp_filter_new(const char *filter_config, @@ -36,5 +40,9 @@ struct rarch_dsp_data void rarch_dsp_filter_process(rarch_dsp_filter_t *dsp, struct rarch_dsp_data *data); +#ifdef __cplusplus +} +#endif + #endif diff --git a/autosave.h b/autosave.h index 3d1a720a56..a6e35fc050 100644 --- a/autosave.h +++ b/autosave.h @@ -16,6 +16,10 @@ #ifndef __RARCH_AUTOSAVE_H #define __RARCH_AUTOSAVE_H +#ifdef __cplusplus +extern "C" { +#endif + #include typedef struct autosave autosave_t; @@ -33,4 +37,8 @@ void lock_autosave(void); void unlock_autosave(void); +#ifdef __cplusplus +} +#endif + #endif diff --git a/cheats.h b/cheats.h index b22893999e..0eee59fb23 100644 --- a/cheats.h +++ b/cheats.h @@ -16,6 +16,10 @@ #ifndef __RARCH_CHEATS_H #define __RARCH_CHEATS_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct cheat_manager cheat_manager_t; cheat_manager_t* cheat_manager_new(const char *path); @@ -28,4 +32,8 @@ void cheat_manager_index_prev(cheat_manager_t *handle); void cheat_manager_toggle(cheat_manager_t *handle); +#ifdef __cplusplus +} +#endif + #endif diff --git a/input/input_common.h b/input/input_common.h index f8c5fc647b..d50a5ba75b 100644 --- a/input/input_common.h +++ b/input/input_common.h @@ -16,14 +16,15 @@ #ifndef INPUT_COMMON_H__ #define INPUT_COMMON_H__ +#ifdef __cplusplus +extern "C" { +#endif + #include "input_context.h" #include #include #include "../driver.h" -#ifdef __cplusplus -extern "C" { -#endif typedef uint64_t retro_input_t ; diff --git a/libretro-sdk/include/gfx/scaler/filter.h b/libretro-sdk/include/gfx/scaler/filter.h index d53e6f3214..3e8e63e5fd 100644 --- a/libretro-sdk/include/gfx/scaler/filter.h +++ b/libretro-sdk/include/gfx/scaler/filter.h @@ -23,10 +23,18 @@ #ifndef __LIBRETRO_SDK_SCALER_FILTER_H__ #define __LIBRETRO_SDK_SCALER_FILTER_H__ +#ifdef __cplusplus +extern "C" { +#endif + #include #include bool scaler_gen_filter(struct scaler_ctx *ctx); +#ifdef __cplusplus +} +#endif + #endif diff --git a/libretro-sdk/include/gfx/scaler/scaler.h b/libretro-sdk/include/gfx/scaler/scaler.h index 97014afcf0..caef6c729a 100644 --- a/libretro-sdk/include/gfx/scaler/scaler.h +++ b/libretro-sdk/include/gfx/scaler/scaler.h @@ -23,6 +23,10 @@ #ifndef __LIBRETRO_SDK_SCALER_H__ #define __LIBRETRO_SDK_SCALER_H__ +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -115,5 +119,9 @@ void scaler_ctx_scale(struct scaler_ctx *ctx, void *scaler_alloc(size_t elem_size, size_t size); void scaler_free(void *ptr); +#ifdef __cplusplus +} +#endif + #endif diff --git a/movie.h b/movie.h index 6909620563..47ff36f3ea 100644 --- a/movie.h +++ b/movie.h @@ -16,6 +16,10 @@ #ifndef __RARCH_MOVIE_H #define __RARCH_MOVIE_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -52,5 +56,9 @@ void bsv_movie_frame_rewind(bsv_movie_t *handle); void bsv_movie_free(bsv_movie_t *handle); +#ifdef __cplusplus +} +#endif + #endif diff --git a/retro.h b/retro.h index 7250b12c6e..1b536d1f58 100644 --- a/retro.h +++ b/retro.h @@ -18,6 +18,10 @@ #ifndef _RETRO_IMPLEMENTATION_V1_H #define _RETRO_IMPLEMENTATION_V1_H +#ifdef __cplusplus +extern "C" { +#endif + #include "libretro.h" typedef struct retro_callbacks @@ -34,4 +38,8 @@ void retro_set_default_callbacks(void *data); void retro_set_rewind_callbacks(void); void retro_flush_audio(const int16_t *data, size_t samples); +#ifdef __cplusplus +} +#endif + #endif diff --git a/rewind.h b/rewind.h index e531284876..4254a7a84f 100644 --- a/rewind.h +++ b/rewind.h @@ -16,6 +16,10 @@ #ifndef __RARCH_REWIND_H #define __RARCH_REWIND_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -34,4 +38,8 @@ void state_manager_push_do(state_manager_t *state); void state_manager_capacity(state_manager_t *state, unsigned int *entries, size_t *bytes, bool *full); +#ifdef __cplusplus +} +#endif + #endif