Skip to content

Commit

Permalink
[core] export functions in mingw-w64 when building as a DLL
Browse files Browse the repository at this point in the history
mingw-w64 supports __declspec(dllexport) and __declspec(import)
  • Loading branch information
robUx4 committed Sep 2, 2022
1 parent 646bf2c commit 1f3f31f
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions srtcore/srt.h
Expand Up @@ -46,19 +46,14 @@ written by
// VC 6.0 does not support unsigned __int64: may cause potential problems.
typedef __int64 uint64_t;
#endif

#ifdef SRT_DYNAMIC
#ifdef SRT_EXPORTS
#define SRT_API __declspec(dllexport)
#else
#define SRT_API __declspec(dllimport)
#endif
#endif
#ifdef SRT_DYNAMIC
#ifdef SRT_EXPORTS
#define SRT_API __declspec(dllexport)
#else
#define SRT_API
#define SRT_API __declspec(dllimport)
#endif
#else // __MINGW32__
#define SRT_API
#endif
#endif
#else
#define SRT_API __attribute__ ((visibility("default")))
#endif
Expand Down

0 comments on commit 1f3f31f

Please sign in to comment.