Skip to content

Conversation

@frozenspider
Copy link
Contributor

Resolves #384

@frozenspider
Copy link
Contributor Author

frozenspider commented Dec 29, 2025

@Lonami, I tried this on my Windows 10 machine, and yeah, it was a little bit of pain, as it often is with Windows 🙂
I did manage to make it work though.
The error was as follows:

error: linking with `link.exe` failed: exit code: 1181
  |
  = note: ...
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: LINK : fatal error LNK1181: cannot open input file 'sqlite3.lib'

See https://cmsd2.silvrback.com/rust-msvc for how to resolve it.

Basically It boils down to this:

  • You'll need SQLite3 DLL/DEF files (downloaded, installed via Chocolatey, etc.)
  • Use lib tool (Microsoft Library Manager) from MSVS to make sqlite3.lib:
    lib.exe /def:sqlite3.def /out:sqlite3.lib
    
  • SQLITE3_LIB_DIR env var needs to point to folder containing sqlite3.lib
  • sqlite3.dll needs to be on the library search path, easiest way is to add its folder to PATH

For binary crate, you could just use rusqlite feature bundled, but for library I don't think this is really an option. It can be done for dev configuration though.

@Lonami
Copy link
Owner

Lonami commented Dec 29, 2025

Thanks for the change and instructions! I can just squash during merge so feel free to push as much as needed.

@frozenspider
Copy link
Contributor Author

This is about what I had in mind. On my Win machine, tests now work without sqlite dll/def/lib shenanigans.

@Lonami Lonami merged commit a2213e8 into Lonami:master Dec 30, 2025
1 check 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.

Switch from sqlite to rusqlite

2 participants