HI! Stuck trying to figure out how to link the libpq package in order to install diesel_cli, I'm self taught and have done some stuff with C and C++ in the past (but not for 7-8 years and I can't remember much about toolchains or anything), I have basic Visual C Build Tools stuff installed but not any package managers. Unsure what exactly I need to do here, and the documents aren't very helpful! Anyone's help would be much appreciated!
The error's I receive are:
error: linking with link.exe failed: exit code: 1181
note: LINK : fatal error LNK1181: cannot open input file 'libpq.lib'
Boy I sure feel dumb! By the looks of it though this is a fairly common problem with not many recent solutions- Just download the binaries for whatever instillation of postgres you need, extract the 'libpq.lib' file located in the lib folder, and then place them in your rustup toolchain's folder at C:\Users\username\ .rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
Not sure if there is a better solution, but I'm all ears!
I've never used Postgres, but it's not uncommon to have to download precompiled libs on Windows. openssl, opencv and turbo-jpeg are three where I've had to do the same.
Some crates have a feature called "bundled", where they do the download for you automatically. Maybe your crate has "bundled"?
nope definitely not... but I figured out the correct answer shortly after posting- left it up for posterity since there are a ton of similar posts on stack overflow from 5+ years ago on windows 11! Thanks for replying!