From ef930b3ca980b78766d76f57139a7a9b00a377b2 Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Wed, 14 Jul 2021 18:38:58 -0700 Subject: [PATCH] [Objective-C API] Fix ORTIsCoreMLExecutionProviderAvailable link error when used from Swift. (#8350) --- objectivec/include/ort_coreml_execution_provider.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/objectivec/include/ort_coreml_execution_provider.h b/objectivec/include/ort_coreml_execution_provider.h index 94043f92fa..a015b6fd60 100644 --- a/objectivec/include/ort_coreml_execution_provider.h +++ b/objectivec/include/ort_coreml_execution_provider.h @@ -5,13 +5,21 @@ #import "ort_session.h" -NS_ASSUME_NONNULL_BEGIN +#ifdef __cplusplus +extern "C" { +#endif /** * Gets whether the CoreML execution provider is available. */ BOOL ORTIsCoreMLExecutionProviderAvailable(void); +#ifdef __cplusplus +} +#endif + +NS_ASSUME_NONNULL_BEGIN + /** * Options for configuring the CoreML execution provider. */