You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed a huge large amount of "USER32.lib" repetitions in the linker command.
It seems that for every method annotated with #[link(name = "USER32")] rust adds "USER32.lib" in linker command line, regardless of whether the method was called or not. Perhaps harmless but it doesn't seem right. I'm not entirely sure if this is windows-rs issue or rust issue, though it should be fixable on windows-rs side by not generating #link directive for a library more than once.
The text was updated successfully, but these errors were encountered:
This is mostly a Rust compiler issue. The fact that a declaration exists in a library, doesn't mean the executable is calling that import. I noticed this myself and consider that a compiler bug. I'm not sure whether others agree, but that's not the way C++ works. I don't really see how windows-rs can do much about this. Since the imports span modules, I necessarily need to have multiple link attributes. The long-term plan is to move away from libs entirely, so I'm reluctant to do much more work here anyway. See #463
I just noticed a huge large amount of "USER32.lib" repetitions in the linker command.
It seems that for every method annotated with #[link(name = "USER32")] rust adds "USER32.lib" in linker command line, regardless of whether the method was called or not. Perhaps harmless but it doesn't seem right. I'm not entirely sure if this is windows-rs issue or rust issue, though it should be fixable on windows-rs side by not generating #link directive for a library more than once.
The text was updated successfully, but these errors were encountered: