mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
gstconfig.h: Always use dllexport/import on Windows
__declspec(dllexport/import) are supported by GCC and are needed for properly generating code that fetches the values of constants from DLLs built with __declspec(dllexport) which happens when anything using GST_EXPORT is built with MSVC. See: https://msdn.microsoft.com/en-us/library/619w14ds.aspx Essentially, if you built gstreamer with MSVC and then tried to use constants from it (such as GST_TYPE_CAPS) in a plugin, GCC would retrieve the address of the value instead of the value itself.
This commit is contained in:
parent
603b8188bb
commit
161eee6694
1 changed files with 2 additions and 2 deletions
|
@ -133,14 +133,14 @@
|
|||
* On Windows, this exports the plugin definition from the DLL.
|
||||
* On other platforms, this gets defined as a no-op.
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32 /* Both 32-bit and 64-bit; both GCC and MSVC */
|
||||
#define GST_PLUGIN_EXPORT __declspec(dllexport) extern
|
||||
#ifdef GST_EXPORTS
|
||||
#define GST_EXPORT __declspec(dllexport) extern
|
||||
#else
|
||||
#define GST_EXPORT __declspec(dllimport) extern
|
||||
#endif
|
||||
#else /* not _MSC_VER */
|
||||
#else /* !_WIN32 */
|
||||
#define GST_PLUGIN_EXPORT
|
||||
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
#define GST_EXPORT extern __attribute__ ((visibility ("default")))
|
||||
|
|
Loading…
Reference in a new issue