From: Michal MalĂ˝ Date: Fri, 1 Jul 2016 14:40:51 +0000 (+0200) Subject: Do not export extraneous symbol from the library on non-Windows X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=835c67dd7b0925ca65e10bb04f6787208586a026;p=libHPCS.git Do not export extraneous symbol from the library on non-Windows platforms --- 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