mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
gstconfig.h: add GST_API_IMPORT define
This is for use by the various GST_*_API decorators and will be what they get defined to when a library API is being used by external users of that library (not the library itself whilst it's being compiled). In most cases it will simply map to a plain 'extern' but on Windows with MSVC it will need to map to __declspec(dllimport). For functions this is not strictly needed, but for exported variables it is. https://bugzilla.gnome.org/show_bug.cgi?id=797185
This commit is contained in:
parent
54e498f2d5
commit
50038bed79
1 changed files with 6 additions and 0 deletions
|
@ -155,6 +155,12 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(GST_STATIC_COMPILATION)
|
||||||
|
# define GST_API_IMPORT __declspec(dllimport) extern
|
||||||
|
#else
|
||||||
|
# define GST_API_IMPORT extern
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GST_API
|
#ifndef GST_API
|
||||||
#define GST_API GST_EXPORT
|
#define GST_API GST_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue