I cannot use cargo for this, so no cargo.toml or anything like that.
I have a file main.rs and I want it to use an extern crate. The crate is not available anywhere online, only on my PC. How can I use that crate from the main.rs file ?
I am not familiar with using rustc directly, but if you post the actual commands you tried, along with some cargo build --verbose commands I can compare with, I can try to guess what you did wrong?
Well, I see the -L . that probably tells rustc to 'include' the files in the current directory, but how would I specify a crate with -L and a full path ?
As I recall, rustc really wants compiled crate filenames to follow a specific pattern, and it's the one that is produced by default when you pass --crate-name as a parameter. It will then use the crate name from the extern declaration (whether it's in the source code or on the command line) to look for files of that particular name in the directories specified by the -L flags.
(I think it's libmycrate.rlib for --crate-name=mycrate, but I'm not sure)