Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wandrson opened this issue Apr 15, 2014 · 3 comments
Closed

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

wandrson opened this issue Apr 15, 2014 · 3 comments
Labels
arduino-builder The tool used to handle the Arduino sketch compilation process arduino-cli Related to the arduino-cli tool Component: Compilation Related to compilation of Arduino sketches feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic
Milestone

Comments

@wandrson
Copy link

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.

@matthijskooijman
Copy link
Collaborator

This is a duplicate of #1734 / #1808

@cmaglie cmaglie added the Type: Duplicate Another item already exists for this topic label Jan 14, 2015
@ricardojlrufino
Copy link
Contributor

I have a tip:
What do you think of working on convention where settings (#define) would be placed in the config.h inside sketch folder?

@cmaglie
Copy link
Member

cmaglie commented May 19, 2015

Closing as duplicate of #1734 #1808

@cmaglie cmaglie closed this as completed May 19, 2015
@ffissore ffissore modified the milestone: Release 1.6.5 May 20, 2015
@per1234 per1234 added feature request A request to make an enhancement (not a bug fix) Component: Compilation Related to compilation of Arduino sketches arduino-cli Related to the arduino-cli tool arduino-builder The tool used to handle the Arduino sketch compilation process labels Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arduino-builder The tool used to handle the Arduino sketch compilation process arduino-cli Related to the arduino-cli tool Component: Compilation Related to compilation of Arduino sketches feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

6 participants