From 835c67dd7b0925ca65e10bb04f6787208586a026 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Fri, 1 Jul 2016 16:40:51 +0200 Subject: [PATCH] Do not export extraneous symbol from the library on non-Windows platforms --- CMakeLists.txt | 2 +- include/libhpcs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9ae483..84e59c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ include(TestBigEndian) project(libHPCS) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) -add_definitions("-std=c89 -Wall -Wextra") +add_definitions("-std=c89 -Wall -Wextra -fvisibility=hidden") if (CMAKE_BUILD_TYPE EQUAL "DEBUG") add_definitions("-ggdb -g3") diff --git a/include/libhpcs.h b/include/libhpcs.h index bfc7c77..ab51fe9 100644 --- a/include/libhpcs.h +++ b/include/libhpcs.h @@ -12,7 +12,7 @@ extern "C" { #define LIBHPCS_API __declspec(dllexport) #define LIBHPCS_CC __cdecl #else -#define LIBHPCS_API +#define LIBHPCS_API __attribute__ ((visibility ("default"))) #define LIBHPCS_CC #endif -- 2.43.5