Linker error 1189 when building a clean project with dynamic linking enabled.
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version 0.14.1
The release number or commit hash of the version you're using.
## Relevant system information
If you cannot get Bevy to build or run on your machine, please include:
- Rust version: 1.80.1
- Windows 10 22H2
## What you did
According to the [guide](https://bevyengine.org/learn/quick-start/getting-started/setup/#enable-fast-compiles-optional) faster compile times can be achieved with dynamic linking. In search of that I enbled dynamic linking by adding the following to my `cargo.toml`:
`bevy = { version = "0.14.1", features = ["dynamic_linking"] }`
## What went wrong
```
error: linking with `link.exe` failed: exit code: 1189
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX64\\x64\\link.exe"
"/DEF:C:X\\Local\\Temp\\rustcD8vSs4\\lib.def"
"/NOLOGO" "X\\AppData\\Local\\Temp\\rustcD8vSs4\\symbols.o"
"X\\target\\debug\\deps\\bevy_dylib-2b3dce39ee4b4c6f.bevy_dylib.90fed09237c39069-cgu.0.rcgu.o"
"X\\target\\debug\\deps\\bevy_dylib-2b3dce39ee4b4c6f.asofsqsln0vum3sln60e977yj.rcgu.rmeta"
"/LIBPATH:X\\target\\debug\\deps"
"/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\atlmfc\\lib\\x64"
"/LIBPATH:X\\target\\debug\\build\\blake3-01a454a5bf9a393f\\out"
"/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\atlmfc\\lib\\x64"
"/LIBPATH:X\\target\\debug\\build\\blake3-01a454a5bf9a393f\\out"
"/LIBPATH:X\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_msvc-0.52.6\\lib"
"/LIBPATH:X\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib"
"X\\target\\debug\\deps\\libbevy_internal-f2c0e9e74a2f412f.rlib"
"X\\target\\debug\\deps\\libbevy_winit-898010402dda6460.rlib"
"X\\target\\debug\\deps\\libaccesskit_winit-d3ae1a99b1858887.rlib"
"X\\target\\debug\\deps\\libaccesskit_windows-153a057c7ac4b847.rlib"
"X\\target\\debug\\deps\\libaccesskit_consumer-b3d184f8d993ded8.rlib"
"X\\target\\debug\\deps\\libimmutable_chunkmap-260bd013ad1732b9.rlib"
"X\\target\\debug\\deps\\libwinit-b69c7b4ffa68fe01.rlib"
"X\\target\\debug\\deps\\libunicode_segmentation-cfa1f6fa6d11c161.rlib"
"X\\target\\debug\\deps\\libwindows_sys-d9454f84c4d72027.rlib"
"X\\target\\debug\\deps\\libcursor_icon-bbf223cbee500960.rlib"
...
= note: LINK : fatal error LNK1189: library limit of 65535 objects exceeded
```
X's are user path stuff, shouldn't be relevant but happy to reveal if needed.
Contributor guide
Research direction
Start with a clean Bevy 0.14.1 project and the Cargo.toml dependency configuration shown in the report, using Rust 1.80.1 on Windows. Reproduce the dynamic-linking build and trace the Bevy dynamic-linking entry points involved in producing the linker inputs. Done means the clean project builds without MSVC LNK1189, with a regression check for the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100