Skip to content

Build process fails with pre-processor conditionals [imported] #792

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
cmaglie opened this issue Nov 15, 2012 · 2 comments
Closed

Build process fails with pre-processor conditionals [imported] #792

cmaglie opened this issue Nov 15, 2012 · 2 comments
Assignees
Labels
Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation
Milestone

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 792 moved from a Google Code project.
Added by 2012-01-15T09:29:01.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

Create a sketch with

if 0

include <lib1.h>

else

include <lib2.h>

endif

The Arduino build process will build and link both lib1 and lib2.

Arduino IDE 1.0, 0023, 0022, 0021 and probably before.
Linux.

You probably ought to run g++ -E (ignoring all errors) and scan the resulting output for the files it has included, then remove all the libraries again from the build process that are not actually used (or something along those lines).

@ffissore
Copy link
Contributor

Answer posted on the original issue

@ffissore ffissore self-assigned this Jan 28, 2015
@ffissore ffissore added the Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation label Jan 28, 2015
@ffissore
Copy link
Contributor

Fixed by #3779

@ffissore ffissore added this to the Release 1.6.6 milestone Sep 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation
Projects
None yet
Development

No branches or pull requests

3 participants