Linking to my own library in Rust gcc:Config


In my file, I placed the following:

extern crate gcc;

fn main() {

and it works well. But now I want to add a couple flags, such as linking to my own library “-lmylib” and maybe “-fPIC”. I can’t seem to figure out how to do that. Any help would be deeply appreciated!


Maybe .flag() ?


Sorry I don’t have a test project or compiler on this machine to check…


There’s also pic() that should deal with -fPIC.


Flag doesn’t seem to do the trick. Is that the only way, do you know?