Skip to content

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

Description

@Murmele

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions