diff options
| author | ruki <[email protected]> | 2016-02-15 09:32:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-02-15 19:10:28 +0800 |
| commit | b78baf22ac0e25d2b18add81d42f733e0cd35620 (patch) | |
| tree | d950c7c372227e300c8bfd780eea6371a4633692 /tests/c++_shared_library/src/interface.h | |
| parent | 202ceb6b071c7a1e95482dcb8bb7b48f24cd5bdc (diff) | |
add some tests
Diffstat (limited to 'tests/c++_shared_library/src/interface.h')
| -rwxr-xr-x | tests/c++_shared_library/src/interface.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/c++_shared_library/src/interface.h b/tests/c++_shared_library/src/interface.h new file mode 100755 index 000000000..ef24ba3ce --- /dev/null +++ b/tests/c++_shared_library/src/interface.h @@ -0,0 +1,24 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#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); + +#ifdef __cplusplus +} +#endif |
