Closed Quentindeve closed 4 months ago
Have you enabled optimizations for your dependencies as instructed by the fast compiles getting started?
Before your answer I did not, but I tried again with this Cargo.toml
[package]
name = "conway-bevy"
version = "0.1.0"
edition = "2021"
[profile.dev]
opt-level = 1
[dependencies]
bevy = { version = "0.13.2", features = ["dynamic_linking"] }
And it didn't work too
I tried compiling it with rust-lld and the same configuration as above, and got the same style of error message: = note: rust-lld: error: too many exported symbols (got 157889, max 65535)
Pretty sure this is exactly the same thing I ran into when I tried using the dynamic_linking feature years ago, and came to the conclusion that it just doesn't work on Windows.
but I tried again with this Cargo.toml
You're missing this part:
[profile.dev.package."*"]
opt-level = 3
Pretty sure this is exactly the same thing I ran into when I tried using the dynamic_linking feature years ago, and came to the conclusion that it just doesn't work on Windows.
Did you just enable the feature or did you also set the optimization level as explained by the guide I previously linked?
As someone who has run into this multiple times on Windows, I'm very sure @SkiFire13's last comment is the correct fix.
Maybe we should be more explicit in the docs that opt-level = 3
is not just an optimization, but actually necessary when using Windows + LLD + dynamic linking?
Changing the tags accordingly. Ping me if the suggested fix does not work @Quentindeve :)
Maybe we should be more explicit in the docs
It is already quite explicit
The big yellow box is telling exactly this, specifying "must" and even reporting the exact error that people run into. I don't know what could be changed, maybe move it before the instructions to enable dynamic linking?
@SkiFire13 haha, it seems my mind just skipped the yellow box automatically. Thanks, you're right. Closing this.
Bevy version
0.13.2
Relevant system information
rustc 1.80.0-nightly (032af18af 2024-06-02)
Windows 10 22H2
What you did
I tried compiling this very simple code:
using the
dynamic_linking
feature.What went wrong
I got an error while linking, with this error output: