Problem with code from book Programming Arduino by Simon Monk

In Chapter 11, C++ and Libraries, I am having problems compiling the below program, I have Windows 10 and IDE ver 1.6.6, after trying to compile I get this error "invalid library found in C:\users\dick\documents\arduino\libraries\simple_flasher_examples:

#include <Flasher.h>

int ledPin = 13;
int slowDuration = 300;
int fastDuration = 100;

Flasher slowFlasher(ledPin, slowDuration);
Flasher fastFlasher(ledPin, fastDuration);

void setup() {}

void loop() 
{
  slowFlasher.flash(5);
  delay(1000);
  fastFlasher.flash(10);
  delay(2000);
}

rlclement:
In Chapter 11

Of what?

What files have you got in C:\users\dick\documents\arduino\libraries\simple_flasher_examples ?

That is a very unusual name for a library folder. If you are going to include Flasher.h then the library folder would normally be called C:\users\dick\documents\arduino\libraries\Flasher

Programming Arduino by Simon Monk, page 150 recommended the name "simple flasher example", I think, regardless of the name, it will not compile and I don't understand why the statement in the IDE "invalid library found in C:\

I am sorry UKHeliBob, I missed the question, the file is simple_flasher_example.ino and I thought it was used to call the Flash.h which is a C++ program and it was my understanding that the Arduino IDE cannot be used with a .h code, hey I am just learning:)

@rlclement, what does "by Si" in your title mean ?

...R

IIRC Si is the Arduino.cc nickname of Simon Monk.

I'll change the title of the thread

rlclement:
In Chapter 11, C++ and Libraries, I am having problems compiling the below program, I have Windows 10 and IDE ver 1.6.6, after trying to compile I get this error "invalid library found in C:\users\dick\documents\arduino\libraries\simple_flasher_examples:

In many cases books, tutorials and libraries are written for a certain version of the Arduino-IDE and the descriptions, code or libraries may fail with later versions of the Arduino IDE.

So I'd recommend: Find out which version of the Arduino-IDE was used for the examples and libraries provided with your book, then download, install and use the same version of the Arduino-IDE when trying out the examples!

examples live inside examples subdirectory of the library in question.

What directory structure are you actually using for the Flasher library?

It should be:

.../libraries/Flasher/Flasher.h
.../libraries/Flasher/Flasher.cpp
.../libraries/Flasher/examples/simple_flasher_example/simple_flasher_example.ino
.../libraries/Flasher/examples/some_other_example/some_other_example.ino

where ... is your sketch folder.

It is precisely where you said it should be

.../libraries/Flasher/

and the files in Flasher are

Flasher.h
Flasher.cpp
examples

The files in examples are

simple_flasher_example/simple_flasher_example.ino