These are chat archives for rust-lang/rust

18th
Mar 2017
Vladimir
@Crazy-Owl
Mar 18 2017 09:35
Guys, can anyone help me with compiling a project on Windows with external dependencies? It keeps telling me that link.exe is not found despite me being able to launch it in the same command prompt by typing link.exe
I have Microsoft Visual C++ Build Tools installed
Update: it tries to launch the linker from my home directory C:\Users\...
Another update: I've managed to point it to the right path by editing cargo config file, but it still keeps telling me that path is incorrect
Vladimir
@Crazy-Owl
Mar 18 2017 10:08
oookay, I've finally managed to specify correct path and collect all the .lib paths
compiling for Windows is such a frustrating experience
red75prime
@red75prime
Mar 18 2017 10:22
MSVC installation has vcvars.bat, to set environment
Chris Dawes
@cmsd2
Mar 18 2017 10:35
Cargo shouldn't need vcvars
Vladimir
@Crazy-Owl
Mar 18 2017 11:25
I've specified full path to linker in cargo configuration, as well as half a dozen paths to VC libs needed
And I also had to include numerous .dll files
Is process of building cargo projects with external dependencies described somewhere?
I have a feeling that I'm doing something wrong
Chris Dawes
@cmsd2
Mar 18 2017 11:41
You could look at rust openssl to see how crates do it sometimes, but yeah since there's no pkgconfig you have to work harder to set up the library paths
Vladimir
@Crazy-Owl
Mar 18 2017 12:21
And still after I add every dll used to archive I'm unable to launch it on another machine.
Vladimir
@Crazy-Owl
Mar 18 2017 13:20
okay, I was finally able to compile and launch it, but I've had a way better experience with MinGW toolchain
Jacob Kiesel
@Xaeroxe
Mar 18 2017 14:36
@Crazy-Owl projects with C dependencies have to create their own linking. There are several tools library developers can use to make this painless for their downstream users but not everyone supports both MingW and MSVC equally well. Conceptually the linking is the same, it just requires someone somewhere to have set it up and there's a good chance whatever library you're using didn't add support for automatic MSVC linking. If you require further assistance please feel free to pm me, I've set up automatic linking for quite a few C dependencies in MSVC, MingW, Linux, and OSX.
Vladimir
@Crazy-Owl
Mar 18 2017 15:18
Thanks! I will pm if I encounter any more problems, for now I've managed to use mingw all the way to build and link the project
Pavel Meledin
@btbvoy
Mar 18 2017 18:35
I’m using stable version of rust 1.16 and I’d like to use unstable feature try_from https://github.com/rust-lang/rfcs/blob/master/text/1542-try-from.md is there any way to enable it in stable version ? If yes - then how ? :-) Please suggest
Peter Atashian
@retep998
Mar 18 2017 18:36
@btbvoy You cannot use unstable features in stable Rust. You'll have to use a nightly.
Pavel Meledin
@btbvoy
Mar 18 2017 18:37
sad_panda.gif :-(
thanks :-)
Pavel Meledin
@btbvoy
Mar 18 2017 19:12
I see here: rust-lang/rust#33417 only some thoughts regarding feature implementation but it’s hard to understand progress and understand any ETA when it’ll reach stable. Any hints / some sources where described a list of steps which each feature should pass in order to get stable branch ?
Jacob Kiesel
@Xaeroxe
Mar 18 2017 19:25
rustup uninstall
Run that in CMD or terminal
Ilya Bogdanov
@vitvakatu
Mar 18 2017 19:25
rustup self uninstall, I suppose.