Skip to content

Fix Windows MSVC CRT mismatch linker error#15

Merged
infil00p merged 1 commit into
mainfrom
fix/windows-crt-linker-conflict
Feb 20, 2026
Merged

Fix Windows MSVC CRT mismatch linker error#15
infil00p merged 1 commit into
mainfrom
fix/windows-crt-linker-conflict

Conversation

@infil00p

Copy link
Copy Markdown
Contributor

Two changes to resolve LNK2005/LNK2038 multiply-defined symbol errors:

  1. Add .cargo/config.toml with /NODEFAULTLIB:LIBCMT for Windows MSVC targets to prevent the static/dynamic CRT conflict introduced by having both staticlib and cdylib crate types.

  2. Disable the esaxx_fast default feature on the tokenizers dependency. That feature pulls in esaxx-rs/cpp, which compiles C++ with .static_crt(true) (/MT), conflicting with the prebuilt ort_sys (ONNX Runtime) binaries that use /MD. The pure-Rust fallback is used instead with no functional impact.

Two changes to resolve LNK2005/LNK2038 multiply-defined symbol errors:

1. Add .cargo/config.toml with /NODEFAULTLIB:LIBCMT for Windows MSVC
   targets to prevent the static/dynamic CRT conflict introduced by
   having both staticlib and cdylib crate types.

2. Disable the esaxx_fast default feature on the tokenizers dependency.
   That feature pulls in esaxx-rs/cpp, which compiles C++ with
   .static_crt(true) (/MT), conflicting with the prebuilt ort_sys
   (ONNX Runtime) binaries that use /MD. The pure-Rust fallback is
   used instead with no functional impact.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@infil00p
infil00p merged commit 308a196 into main Feb 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant