Setting the include path with bindgen

前端 未结 1 863
借酒劲吻你
借酒劲吻你 2021-02-19 00:17

I\'m writing a Rust interface to a small C library, which has headers spread in a few locations. It\'s not a system library, and is normally used by some executables in the same

1条回答
  •  眼角桃花
    2021-02-19 00:45

    With the API you can use Builder::clang_arg with arbitrary arguments:

    let b = bindgen::builder().header("foo.h").clang_arg("-I/path");
    

    From the command line you can do the same by appending arguments after --, like:

    bindgen foo.h -- -I/path
    

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题