]> Devoid-pointer.net GitWeb - libHPCS.git/commitdiff
Do not export extraneous symbol from the library on non-Windows
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 1 Jul 2016 14:40:51 +0000 (16:40 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 1 Jul 2016 14:40:51 +0000 (16:40 +0200)
platforms

CMakeLists.txt
include/libhpcs.h

index a9ae483332fefc71e0f7d87ac165db253a430a66..84e59c30bdf9bda377c11fb2f7fea28b28e5054d 100644 (file)
@@ -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")
index bfc7c7707f42579c2b55bef4894d9f23223d0162..ab51fe94611de7e2bd201fdc4064f05cf1a52898 100644 (file)
@@ -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