Skip to content

cpp! fails with "not found in metadata" #115

@Decapitated

Description

@Decapitated

Hi, I ran into an issue where my project builds fine once, but then subsequent builds fail with errors like:

error: This cpp! macro is not found in the library's rust-cpp metadata.
note: Only cpp! macros found directly in the program source will be parsed -
note: They cannot be generated by macro expansion.](error: This cpp! macro is not found in the library's rust-cpp metadata. NOTE: Only cpp! macros found directly in the program source will be parsed - NOTE: They cannot be generated by macro expansion.

For some reason it wasn't getting rebuilt on changes.

To fix this, I added this to build.rs:

println!("cargo:rerun-if-changed=src/main.rs");

Note: I am using the latest nightly toolchain.

I just wanted to create this issue in case someone else runs into this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions