lv_binding_rust icon indicating copy to clipboard operation
lv_binding_rust copied to clipboard

`lv_binding_rust/lvgl-sys/vendor/lvgl/src/misc/lv_mem.h:20:10: fatal error: 'string.h' file not found`

Open Murmele opened this issue 10 months ago • 0 comments

I got the error message when compiling for embedded: lv_binding_rust/lvgl-sys/vendor/lvgl/src/misc/lv_mem.h:20:10: fatal error: 'string.h' file not found

Solution: modifying lvgl-sys/build.rs by adding the arm-none-eabi include path

let mut cc_args = vec![
        "-DLV_CONF_INCLUDE_SIMPLE=1",
        "-I",
        lv_config_dir.to_str().unwrap(),
        "-I",
        vendor.to_str().unwrap(),
        "-I",                         // Added
        "/usr/arm-none-eabi/include", // Added
        "-fvisibility=default",
    ];

My Cargo.toml:

lvgl = {version = "0.6.2", path="../../lv_binding_rust/lvgl", default-features = false, features = ["embedded_graphics"]}

Is there a better solution instead of modifying build.rs?

Murmele avatar Jan 18 '25 21:01 Murmele