Skip to content

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

Closed
@cmaglie

Description

@cmaglie

This is Issue 792 moved from a Google Code project.
Added by 2012-01-15T09:29:01.000Z by gooc...@top.geek.nz.
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).

Metadata

Metadata

Assignees

Labels

Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions