From a6978c399bc6121cab3cd239afb6948b3f04ee7a Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 6 May 2022 16:42:38 +0800 Subject: Do not export BN C API functions in demo on Windows --- binaryninjacore.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/binaryninjacore.h b/binaryninjacore.h index 39b44921..3eaeb628 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -52,12 +52,17 @@ #define BINARYNINJAPLUGIN __attribute__((visibility("default"))) #else #ifdef _MSC_VER - #ifdef BINARYNINJACORE_LIBRARY - #define BINARYNINJACOREAPI __declspec(dllexport) + #ifndef DEMO_VERSION + #ifdef BINARYNINJACORE_LIBRARY + #define BINARYNINJACOREAPI __declspec(dllexport) + #else + #define BINARYNINJACOREAPI + #endif + #define BINARYNINJAPLUGIN __declspec(dllexport) #else #define BINARYNINJACOREAPI + #define BINARYNINJAPLUGIN #endif - #define BINARYNINJAPLUGIN __declspec(dllexport) #else #define BINARYNINJACOREAPI #endif -- cgit v1.3.1