Setting the include path with bindgen

前端 未结 1 861
借酒劲吻你
借酒劲吻你 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)
提交回复
热议问题