Skip to content

Need to pass defines to library cpp files during sketch compile #2015

Closed
@wandrson

Description

@wandrson

I am attempting to modify my Entropy library to allow the user to decide if they want to include floating point functions for the library. I placed conditional defines around the relavent code; however, it wouldn't link. I determined that the source level #define was not being passed to the libraries cpp compile, though it was passed to the libraries header file.

My current solution is to require the user to comment/uncomment the header file for the library, but this is cumbersome, and problematic. It would be nice if the compilation for library code included the defines made by the Arduino sketch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CompilationRelated to compilation of Arduino sketchesType: DuplicateAnother item already exists for this topicarduino-builderThe tool used to handle the Arduino sketch compilation processarduino-cliRelated to the arduino-cli toolfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions