Add C:\Program Files\PostgreSQL\'YOUR VERSION'\lib and C:\Program Files\PostgreSQL\'YOUR VERSION'\bin to your PATH. Restart PC. Run cargo clean. Run cargo build. Have same error on windows 10.