1 #pragma once
2 
3 /* Both funcs here for simplicity. */
4 
5 #if defined _WIN32 || defined __CYGWIN__
6 #if defined BUILDING_DLL
7   #define DLL_PUBLIC __declspec(dllexport)
8 #else
9   #define DLL_PUBLIC __declspec(dllimport)
10 #endif
11 #else
12   #if defined __GNUC__
13     #define DLL_PUBLIC __attribute__ ((visibility("default")))
14   #else
15     #pragma message ("Compiler does not support symbol visibility.")
16     #define DLL_PUBLIC
17   #endif
18 #endif
19 
20 int DLL_PUBLIC func1(void);
21 int DLL_PUBLIC func2(void);
22