Skip to content

fix(mavlink_passthrough): export operator<< for Result with MAVSDK_PUBLIC#2881

Open
evanofficial wants to merge 1 commit into
mavlink:mainfrom
evanofficial:fix-mavlink-passthrough-result-public
Open

fix(mavlink_passthrough): export operator<< for Result with MAVSDK_PUBLIC#2881
evanofficial wants to merge 1 commit into
mavlink:mainfrom
evanofficial:fix-mavlink-passthrough-result-public

Conversation

@evanofficial
Copy link
Copy Markdown

The friend std::ostream& operator<< for MavlinkPassthrough::Result in mavlink_passthrough.hpp is missing the MAVSDK_PUBLIC visibility specifier, so the symbol is hidden in libmavsdk.so and consumers hit a linker error when they try to stream a Result (e.g. std::cout << result;).

The equivalent operator<< for MavlinkDirect::Result in mavlink_direct.hpp already uses MAVSDK_PUBLIC — this PR just mirrors that pattern for consistency.

Fixes #2880.

…BLIC

Without the export macro the operator<< symbol has hidden visibility
and is unreachable from outside libmavsdk.so, causing a linker error
when consumers try to stream a MavlinkPassthrough::Result. Mirrors
the declaration of the equivalent operator<< in MavlinkDirect.

Fixes mavlink#2880.
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.

operator<< for MavlinkPassthrough::Result missing MAVSDK_PUBLIC

2 participants