Skip to content

Commit

Permalink
[API] export functions in mingw-w64 when building as a DLL (#2451)
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 5, 2022
1 parent 646bf2c commit ec52c45
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions srtcore/srt.h
Expand Up @@ -46,17 +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__
#else // !SRT_DYNAMIC
#define SRT_API
#endif
#else
Expand Down

0 comments on commit ec52c45

Please sign in to comment.