comparison Core/OrthancFramework.h @ 3996:c2b9a7a1c74a

ORTHANC_FRAMEWORK_BUILDING_PLUGIN
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Jun 2020 18:26:01 +0200
parents f9863630ec7f
children 44e2a8e0b6ae
comparison
equal deleted inserted replaced
3995:1f405a3fdeca 3996:c2b9a7a1c74a
39 * "OrthancFramework.h" 39 * "OrthancFramework.h"
40 **/ 40 **/
41 #ifndef __ORTHANC_FRAMEWORK_H 41 #ifndef __ORTHANC_FRAMEWORK_H
42 #define __ORTHANC_FRAMEWORK_H 42 #define __ORTHANC_FRAMEWORK_H
43 43
44 #if !defined(ORTHANC_FRAMEWORK_BUILDING_PLUGIN)
45 # error Macro ORTHANC_FRAMEWORK_BUILDING_PLUGIN must be defined
46 #endif
47
44 /** 48 /**
45 * It is implied that if this file is used, we're building the Orthanc 49 * It is implied that if this file is used, we're building the Orthanc
46 * framework (not using it): We don't use the common "BUILDING_DLL" 50 * framework (not using it as a shared library): We don't use the
51 * common "BUILDING_DLL"
47 * construction. https://gcc.gnu.org/wiki/Visibility 52 * construction. https://gcc.gnu.org/wiki/Visibility
48 **/ 53 **/
49 #if defined(_WIN32) || defined (__CYGWIN__) 54 #if ORTHANC_FRAMEWORK_BUILDING_PLUGIN == 0
50 # define ORTHANC_PUBLIC __declspec(dllexport) 55 # if defined(_WIN32) || defined (__CYGWIN__)
56 # define ORTHANC_PUBLIC __declspec(dllexport)
57 # define ORTHANC_LOCAL
58 # else
59 # if __GNUC__ >= 4
60 # define ORTHANC_PUBLIC __attribute__((visibility ("default")))
61 # define ORTHANC_LOCAL __attribute__((visibility ("hidden")))
62 # else
63 # define ORTHANC_PUBLIC
64 # define ORTHANC_LOCAL
65 # pragma warning Unknown dynamic link import/export semantics
66 # endif
67 # endif
68 #else
69 # define ORTHANC_PUBLIC
51 # define ORTHANC_LOCAL 70 # define ORTHANC_LOCAL
52 #else
53 # if __GNUC__ >= 4
54 # define ORTHANC_PUBLIC __attribute__((visibility ("default")))
55 # define ORTHANC_LOCAL __attribute__((visibility ("hidden")))
56 # else
57 # define ORTHANC_PUBLIC
58 # define ORTHANC_LOCAL
59 # pragma warning Unknown dynamic link import/export semantics
60 # endif
61 #endif 71 #endif
62 72
63 #endif /* __ORTHANC_FRAMEWORK_H */ 73 #endif /* __ORTHANC_FRAMEWORK_H */