Skip to content

Implement GCC visibility support #301

Description

@ethanmusser

Implement GCC visibility support as part of the MULTISENSE_API macro.

Relevant Code

#if !defined(MULTISENSE_API)
# if defined (_MSC_VER)
# if defined (MultiSense_STATIC)
# define MULTISENSE_API
# elif defined (MultiSense_EXPORTS)
# define MULTISENSE_API __declspec(dllexport)
# else
# define MULTISENSE_API __declspec(dllimport)
# endif
# else
# define MULTISENSE_API
# endif
#endif

Original Comment (@jmonticelli)

GNU has visibility support, and if done tastefully, can be of great benefit -- though I don't believe you need it by default.

https://gcc.gnu.org/wiki/Visibility

That link not only shows how the feature can be useful, but shows the inverse optimization, which this library doesn't support, but could in the future.

Guaranteed to increase complexity, but worth being aware of regardless, even if this is something we punt on now.

Originally posted by @jmonticelli in #296 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions