mirror of
https://github.com/xiph/opus.git
synced 2025-05-28 22:29:14 +00:00
win32: only use dllexport when building DLL
If building a static library, marking symbols as dllexport causes them to be exported from the final executable. For example, run objdump -x opus_demo.exe on a --disabled-shared build and look for the export table; there should not be one in a normal Win32 .exe file, but when linking static libopus, the exe exports all of the opus_* public functions. Use the libtool-defined DLL_EXPORT flag to determine whether we are building a DLL and only specify __declspec(dllexport) in that case.
This commit is contained in:
parent
787eee29b8
commit
6e9617371f
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ extern "C" {
|
|||
|
||||
#ifndef OPUS_EXPORT
|
||||
# if defined(WIN32)
|
||||
# ifdef OPUS_BUILD
|
||||
# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
|
||||
# define OPUS_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define OPUS_EXPORT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue