gtk-rs / gir

Tool to generate rust bindings and user API for glib-based libraries
https://gtk-rs.org/gir/book/
MIT License
230 stars 102 forks source link

Revert "Specify link attribute for Windows to be happy" #1475

Open thiblahute opened 1 year ago

thiblahute commented 1 year ago

This reverts commit a8dc21319bf6edaba19b2046ffd60c80fd91a2d7.

Linking flags should be provided by the system-deps crate. Specifying linking with the attribute creates issue when statically linking system dependencies.

sdroege commented 1 year ago

This will likely break things on Windows CC @seungha-yang.

Also after this it will be required to change some manual cases, e.g. in glib/src/param_spec.rs

sdroege commented 1 year ago

Unfortunately none of us can remember the details of this and the PR description was not very... descriptive.

Can you try removing all these, and then try building

  1. gst-plugins-rs in MSVC
  2. Some Rust application using the bindings in MSVC

If that all works fine it's probably all OK.

thiblahute commented 1 year ago

I update gst-rs with that commit and CI passes: https://gitlab.freedesktop.org/thiblahute/gstreamer-rs/-/pipelines/904700 (well apart from regen-check) .

I updated gst-plugins-rs on top of that and ci looks all good https://gitlab.freedesktop.org/thiblahute/gst-plugins-rs/-/pipelines/904754

Do you think that is enough?

sdroege commented 1 year ago

Please compile gst-plugins-rs with gtk-rs-core, gtk4 and gstreamer-rs regenerated with this and the manual #[link] attributes removed from the code too. That would be enough to convince me that this is not needed anymore :)

sdroege commented 1 year ago

@thiblahute Any updates here?

sdroege commented 11 months ago

https://github.com/gtk-rs/gtk-rs-core/commit/d14883cbb9f56a5b63af0ab6a600a76d5c6a49c2 has some more background why this was added, and also https://github.com/gtk-rs/gtk-rs-core/pull/1199 is related.