cassandra-rs icon indicating copy to clipboard operation
cassandra-rs copied to clipboard

Build fail on windows

Open Nagispace opened this issue 3 years ago • 3 comments

I have a project that uses this crate but it fails because the linker cannot find 'cryoto.lib' I have installed correctly every dependencies. any idea ?

Nagispace avatar Aug 01 '22 16:08 Nagispace

Hi @Nagispace - I haven't tried building on Windows so I can't give specific assistance. Please could you copy and paste the entire message, in case someone else is able to help?

kw217 avatar Aug 03 '22 13:08 kw217

I'm also trying to build on windows, running cargo build compiles the project but linking fails. Here's the entire error message: https://hastebin.com/osajusoxuf.pl

Molkars avatar Sep 25 '22 01:09 Molkars

Thanks - the error appears to be:

error: linking with `link.exe` failed: exit code: 1181
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "%HOME%\\AppData\\Local\\Temp\\rustc2mknMq\\symbols.o" "%HOME%\\dev\\projects\\project\\project_api\\target\\debug\\deps\\project.10mpx8fccwah0mmv.rcgu.o" [... thousands of chars omitted...]
  = note: LINK : fatal error LNK1181: cannot open input file 'crypto.lib'

I suspect this relates to the crate dependency cassandra-sys-rs which has the following in its build.rs:

    println!("cargo:rustc-flags=-l dylib=cassandra");
    println!("cargo:rustc-flags=-l dylib=crypto");
    println!("cargo:rustc-flags=-l dylib=ssl");

I think crypto is part of libssl. Perhaps another Windows developer has experience of how to get this library installed?

kw217 avatar Sep 27 '22 11:09 kw217