Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosidl_typesupport_cpp generated library should use a visibility macro that's unique to it #142

Open
sloretz opened this issue May 11, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sloretz
Copy link
Contributor

sloretz commented May 11, 2023

The package rosidl_typesupport_cpp ships with a utility library called rosidl_typesupport_cpp which uses the preprocessor definition ROSIDL_TYPESUPPORT_CPP_BUILDING_DLL to control dllimport/dllexport on Windows.

However, when a package generates a library for ROS messages, the rosidl_typesupport_cpp generator also generates a package specific library which also uses ROSIDL_TYPESUPPORT_CPP_BUILDING_DLL as the preprocessor definition for it's visibility macros.

If the generated library were to include the utility library, then at the build time of the generated library the visibility macros in the headers of the utility library would incorrectly say dllexport, meaning the generated library would be built as if the utility library's symbols also lived inside the generated library and need to be exported.

To fix this, the generated library should have its own visibility header and macro.

@sloretz sloretz added bug Something isn't working help wanted Extra attention is needed labels May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant