summaryrefslogtreecommitdiff
path: root/xmake/templates/c/shared_library/project/src/interface.h
blob: 7a3eb570acf7dd279f5626370c569ba56d23a1d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#if defined(_WIN32)
#   define __export         __declspec(dllexport)
#elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
#   define __export         __attribute__((visibility("default")))
#else
#   define __export         
#endif

/*! calculate add(a, b) 
 *
 * @param a     the first argument
 * @param b     the second argument
 *
 * @return      the result
 */
__export int    add(int a, int b);