ezieragabriel / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

IDE does not report missing #include files any more #1057

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make a sketch which includes a non-existent include file.
2. Compile it.

What is the expected output? What do you see instead?

The missing include file is not reported as an error, however flow-on errors 
are.

(Apologies if this is already reported, however searching outstanding bugs for 
the word "include" or "error" return practically every issue).

I've noticed recently that if you don't incorporate a library (eg. you haven't 
restarted the IDE) or otherwise misspell an "#include" directive that the error 
about the missing file is suppressed. This is not at all helpful, as you then 
start wondering why something like SPI "is not declared".

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?

IDE 1.0.1.
OS/X
Board not relevant.

Please provide any additional information below.

Example:

#include <SPIFOO.h>
void setup()
{
  SPI.begin ();
}

void loop()
{
}

With verbose compiling on:

sketch_oct01a.cpp:1:20: warning: SPIFOO.h: No such file or directory

With verbose compiling off, that line is omitted from the IDE output. You only 
get:

sketch_oct01a.cpp: In function 'void setup()':
sketch_oct01a:3: error: 'SPI' was not declared in this scope

Original issue reported on code.google.com by jainh...@gammon.com.au on 30 Sep 2012 at 9:11

GoogleCodeExporter commented 9 years ago
This is bad.  The example has pretty simple errors, but when a naive user tries 
to compile a published sketch without properly installing a library, they can 
get a long and bewildering list of errors.
http://code.google.com/p/arduino/issues/detail?id=1050 is related, I think.
The user was getting all sorts of verbose errors, but when I tried to duplicate 
the problem (with verbose compilation), I just got the "non-existant include 
file" error.

Original comment by wes...@gmail.com on 30 Sep 2012 at 11:07

GoogleCodeExporter commented 9 years ago
This is caused by the `-w` flag on the compiler command line, which keeps 
warnings from being reported. Closing as duplicate of 
https://github.com/arduino/Arduino/issues/1728

Original comment by federico...@gmail.com on 22 Feb 2014 at 5:12