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

[Windows] It is nice YAML_CPP_DLL is exported by default. #10

Closed
seanyen opened this issue May 8, 2020 · 11 comments · Fixed by #38
Closed

[Windows] It is nice YAML_CPP_DLL is exported by default. #10

seanyen opened this issue May 8, 2020 · 11 comments · Fixed by #38
Assignees
Labels
enhancement New feature or request

Comments

@seanyen
Copy link
Contributor

seanyen commented May 8, 2020

On Windows, the yaml-cpp is built as shared libraries. In such case, YAML_CPP_DLL is required to define to correctly consume the yaml-cpp (otherwise, visibility decoration won't be defined and it results in linkage time error).

And currently every project consuming yaml-cpp will need to define it in their CMake project to enable Windows build. It would be nice to see this exported directly from this package and all the downstream project can get the definition for free.

UPDATED:
For example,

And I discovered this issue when I try to enable navigation2 on Windows.

@dirk-thomas
Copy link
Member

@seanyen Please provide a pull request to add the necessary definition to the ExternalProject_Add call.

@dirk-thomas
Copy link
Member

Please also describe your exact steps when you run into problem since afaik we are currently able to use this package as is on Windows without problems.

@seanyen
Copy link
Contributor Author

seanyen commented May 8, 2020

Thanks for the pointer. I will be looking how to export it from ExternalProject_Add and I added some examples how does it affect the downstream projects.

@dirk-thomas
Copy link
Member

So everything works fine atm but you propose a change in order to be able to remove these workarounds in other packages. That wasn't clear from the original description. Sounds good to me.

Please also make pull requests for the referenced packages so that it can be checked that the to-be-proposed change makes today workarounds obsolete.

@hidmic hidmic added the enhancement New feature or request label May 21, 2020
@hidmic
Copy link

hidmic commented May 21, 2020

Are you still picking this up @seanyen ?

@dirk-thomas
Copy link
Member

@seanyen Friendly ping.

@jacobperron
Copy link
Member

Bumping. I also ran into this issue; I had to add #define YAML_CPP_DLL to resolve.

@clalancette
Copy link
Contributor

This should now be solved on the latest with #25 being merged. It should also be solved in Galactic and Foxy with PRs #30 and #31, so I'm going to go ahead and close this out.

@Ace314159
Copy link
Contributor

@clalancette I see #30 and #31 haven't been merged yet. Are there plans to merge them or is something holding them up?

@jacobperron
Copy link
Member

I've approved and triggered Windows CI for #30 and #31.

@jacobperron
Copy link
Member

Circling back here, it's not clear that #25 actually resolved this issue since removing the YAML_CPP_DLL patches in connected PRs results in a build failure.

Connected PRs:

Maybe there's something else missing in the downstream packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
6 participants