[solved]PROGMEM not usable in header files

hi,
PROGMEM can only be used within a sketch.
Using it within a header file causes compiler errors.

Does it?

Please post a short sketch and header file exhibiting the error. By short, I mean just enough to exhibit the error and no more. I'd expect your header to be just the variable declaration, and the .ino to be a setup and loop that references that variable.

Would you care to provide any details?
code in a .h file is treated identically to code in a sketch.
Note that some system .h files are automatically included in a sketch, and you may be required to include them manually in a .h or .cpp file, depending on exact positioning of the #include.

Using it within a header file causes compiler errors.

That is incorrect. Trying to use PROGMEM in a class, defined in a header file, is a different story.

Quit making unsubstantiated claims. Post some proof. Otherwise, you come across as a clueless dweeb. I'm sure that is not your intent.

From your responses I guess that perhaps some includes are missing, but which of them?
The first part of the header file is (there are no includes):

#ifndef    EPD_H
  #define  EPD_H
	

#define    // at lot of defines here
const int arrow_y[] PROGMEM = {-98, -98, -60, -98, -83, -55, -83, -56, -42, -56, -20, -23};

The error message from compiler is:

In file included from sketch\epd.cpp:14:0:

epd.h:94: error: expected initializer before 'PROGMEM'

const int arrow_y PROGMEM = {-98, -98, -60, -98, -83, -55, -83, -56, -42, -56, -20, -23,

^

exit status 1

From your responses I guess that perhaps some includes are missing, but which of them?

avr/pgmspace.h

avr/pgmspace.h

That's it. Thank you very much.

SupArdu