Skip to content

Conversation

@ePirat
Copy link
Collaborator

@ePirat ePirat commented Nov 7, 2025

  • Add a new header with helpers for API export handling across different compilers.
  • Replace config.h with a properly namespaced variant and namespaced macros, this should make it harder to clash with existing defines in other build systems consuming libspatialaudio headers.
  • Add a hint if spatialaudio was built statically, in which case the export handling needs to behave differently on Windows.

@ePirat ePirat self-assigned this Nov 7, 2025
@ePirat
Copy link
Collaborator Author

ePirat commented Nov 7, 2025

🎉 Seems to be working so far.
Only need to add the proper handling for static builds on Windows now.

Adds and API export helpers header that defines appropriate defines to
mark public API symbols. Also adds the needed build system arguments
to properly make use of them for shared libraries.

Further work to make this work properly for static libraries on Windows
will be done in a follow-up commit.

Ref videolabs#56
@ePirat ePirat force-pushed the epirat-feat-api-exports branch 3 times, most recently from d371172 to a5d48bc Compare November 8, 2025 00:44
@ePirat ePirat changed the title Properly mark exported APIs Properly mark exported APIs and replace config.h Nov 8, 2025
@ePirat ePirat added this to the v0.4.0 Release milestone Nov 8, 2025
@ePirat ePirat linked an issue Nov 8, 2025 that may be closed by this pull request
@ePirat
Copy link
Collaborator Author

ePirat commented Nov 8, 2025

@jbkempf This finally fixes the CI for Windows.

Just need to fix static lib handling when building 'both' for Windows with meson, however thats not incredibly urgent IMHO.

So the only big blocker for the release are now #60 and investigate if #30 is still needed.

This new file has properly prefixed defines preventing name
clashes with macros defined in library consumer build systems.

Additionally a new define is added that hints if the library was built
statically, needed to properly disable API imports in that case,
on Windows.
@ePirat ePirat force-pushed the epirat-feat-api-exports branch from a5d48bc to b34e477 Compare November 8, 2025 01:17
@jbkempf
Copy link
Collaborator

jbkempf commented Nov 9, 2025

Works for me. I like it.

@ePirat ePirat marked this pull request as ready for review November 10, 2025 15:46
@ePirat ePirat merged commit 0c9fc9a into videolabs:master Nov 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Properly mark exported symbols

2 participants