diff options
| author | 2026-11-25 15:20:38 +0100 | |
|---|---|---|
| committer | 2026-11-25 15:20:38 +0100 | |
| commit | 5aa836683822355ba6260a4ce88d5209762161a8 (patch) | |
| tree | 441dabfc0ddc325c7091d2d3b28a2f9223e2ed6d /test/order.test | |
| parent | b3f14c22dbb29056c0d3c37bb9b2401ffdb7bc8f (diff) | |
| download | libplist-5aa836683822355ba6260a4ce88d5209762161a8.tar.gz libplist-5aa836683822355ba6260a4ce88d5209762161a8.tar.bz2 | |
Windows: Don't use dllimport; only apply dllexport to DLL objects
Public headers declared the API macro as __declspec(dllimport) on
Windows unless *_STATIC was defined. That made consumers reference
__imp_<symbol>, which only exists in the DLL import library, so linking
against the static library failed unless the consumer also defined
*_STATIC.
All exported symbols are functions, so dllimport is not needed: calls
to plain symbols link against both the static library and the import
library (via its thunks). Drop it from the public headers.
On the library side, apply __declspec(dllexport) only when libtool
defines DLL_EXPORT, i.e. when compiling the objects for the DLL. This
keeps export directives out of the objects that go into the static
library when both are built.
Diffstat (limited to 'test/order.test')
0 files changed, 0 insertions, 0 deletions
