PLCnext API Documentation 25.0.2.69
DslExport.hpp
Go to the documentation of this file.
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8
11
12#ifndef ARP_INSIDE_ARP_BASE_CORE_ARP_H
13 #error Never include 'DslExport.hpp' directly, just include 'Arp.hpp'
14#endif
15
16#if defined ARP_CXX_TOOLSET_MSVC
17
18 #define ARP_EXPORT __declspec(dllexport)
19 #define ARP_IMPORT __declspec(dllimport)
20 // The ARP_CXX_SYMBOL_EXPOR/ARP_CXX_SYMBOL_IMPORT macros are defined in .props files of Arp solution build,
21 // because in static libs the macro has to be empty,
22 // due to export enum problem when multiple dll's link to the origin definition
23
24#elif defined ARP_CXX_TOOLSET_CYGWIN
25
26 #define ARP_EXPORT __attribute__ ((dllexport))
27 #define ARP_IMPORT __attribute__ ((dllimport))
28 #define ARP_CXX_SYMBOL_EXPORT __attribute__ ((dllexport))
29 #define ARP_CXX_SYMBOL_IMPORT __attribute__ ((dllimport))
30
31#elif defined ARP_CXX_TOOLSET_GNUC
32
33 #if __GNUC__ >= 4
34
35 #define ARP_EXPORT __attribute__ ((visibility ("default")))
36 #define ARP_IMPORT __attribute__ ((visibility ("default")))
37 #define ARP_CXX_SYMBOL_EXPORT __attribute__ ((visibility ("default")))
38 #define ARP_CXX_SYMBOL_IMPORT __attribute__ ((visibility ("default")))
39
40 #else
41
42 #define ARP_EXPORT
43 #define ARP_IMPORT
44 #define ARP_CXX_SYMBOL_EXPORT
45 #define ARP_CXX_SYMBOL_IMPORT
46
47 #endif
48
49#else
50
51 #error "Toolset is not supported"
52
53#endif