AVR Library

mikeworkman:
Thank you both.

Not needing it is a big clue - thanks. So when programs have a

#include <avr/wdt.h>

the assumption is in this case that the library is there by default.

The IDE doesn't look like it recognizes it. For example if I look at a sketch that I used for a temperature controller I have

The IDE text editor doesn't recognize it as an Arduino library that specified color highlighting.
Which is correct since it isn't part of the Arduino s/w.
avr/wdt.h is part of the avr-gcc s/w and is specific to the AVR chips.
(see more details below)

#include <OneWire.h>

The Orange seeming to indicate it recognizes the stuff I put in the Library. When I include the avr/wdt.h function, I get nothing (all black) which seems to me to indicate it doesn't "see" the stuff to include. Am I wrong about this? Indeed when I compile I get

That highlighting is an Arduino IDE thing.
The IDE looks for header files under all the Arduino libraries directories
in the system libraries directory and then under you sketchbook/libraries directory.
When it it finds a header file, in one of those directories, it then does some special things.
One of the things it does is then look for a file called keywords.txt
This controls which strings in your sketch files are highlighted when
displayed in the IDE.

avr/wdt.h is not part of the Arduino system. It is part of the avr-gcc package
(which is bundled with the Arduino IDE)

sketch_may30ax3000_Working_up.ino:1:9: error: #include expects "FILENAME" or

So I thought perhaps I cobbled up the directory location of the original download of the Arduino IDE?

Would it be correct to locate the avr/wdt.h and plop the entire path name into the include statement then? Or are there assumptions I am making that are incorrect?
They are incorrect.

When I include include the wdt.h file -

and then enable the timer with

wdt_enable(WDTO_8s);

compiler comes back with an error

sketch.....: error: expected constructor, destructor, or type conversion before '(' token

indicating to me that it doesn't have the avr/wdt.h which of course the error told me above, but just saying...

??

Mike

Something very odd is happening.

Are you calling

wdt_enable(WDTO_8s);

inside your setup() function?

You should turn on verbose output mode so you can really see what is really happening.
Some versions of the gcc compiler do not consider a missing header file as an error
and simply emit a warning.
Unfortunately, the Arduino team believes that warnings are bad, so by default
the IDE hides all warnings.
If you turn on verbose mode in the IDE, you will see all the warnings.
[file]->[Preferences]

Other than that, I'd suggest that you
post a small full sketch that can demonstrate the problem
so we can replicate what you are seeing.

--- bill