Skip to content

Refactor TextTrackPluginWrapper to include module definition and headers in source file#482

Open
bramoosterhuis wants to merge 1 commit intordkcentral:masterfrom
bramoosterhuis:fix/text-track-module-name-undefined-symbol
Open

Refactor TextTrackPluginWrapper to include module definition and headers in source file#482
bramoosterhuis wants to merge 1 commit intordkcentral:masterfrom
bramoosterhuis:fix/text-track-module-name-undefined-symbol

Conversation

@bramoosterhuis
Copy link
Copy Markdown

Fix undefined reference to TextTrackClosedCaptionsStyleClient

TextTrackPluginWrapper.h defined MODULE_NAME as TextTrackClosedCaptionsStyleClient and
included <com/com.h> and <core/core.h>. This caused CallsignTLS<&TextTrackClosedCaptionsStyleClient>
to be instantiated in every translation unit that included the header. However TextTrackClosedCaptionsStyleClient
was never defined anywhere, resulting in an undefined reference at link time for any library linking
against libRialtoWrappers.

Changes

  • Remove MODULE_NAME definition and Thunder includes from TextTrackPluginWrapper.h
  • Move them to TextTrackPluginWrapper.cpp as the owning translation unit
  • Add MODULE_NAME_ARCHIVE_DECLARATION to properly define TextTrackClosedCaptionsStyleClient

Why MODULE_NAME_ARCHIVE_DECLARATION

libRialtoWrappers is a static library — the archive variant is correct here as it omits the
shared library metadata registration that MODULE_NAME_DECLARATION adds.

Impact

Downstream packages linking against libRialtoWrappers were failing with
undefined reference to 'TextTrackClosedCaptionsStyleClient' at link time.
This fix resolves that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant