# How to debug error of “unknown type name __progmem__”?

I'm using atmel studio 6.1 with a code containing but on compilation conpiler gives error as mentioned above and after googling error,I found that this variable progmem has been depriciated,but no solution for fixing it. so anyone can plz help me? I'm writing this code for ATmega32 to control GLCD JHD12864E. excerpt of code

#ifndef _FONT_H_
#define _FONT_H_
#define __PROG_TYPES_COMPAT__
#include "avr/pgmspace.h"
#include "types.h"

//Constants
#define FONT_OFFSET_WIDTH 2
#define FONT_OFFSET_HEIGHT 3
#define FONT_OFFSET_FIRSTCHAR 4
#define FONT_OFFSET_CHARCOUNT 5
#define FONT_OFFSET_WTABLE 6

//Main Selected Font
const __progmem__ *font;

//Functions
void __GFXInitFont();

UINT8 GFXGetFontHeight();


• Since the type specifier/qualifier is deprecated, and your toolchain doesn't understand it, have you tried ... removing it? This code would be more portable if it defined a macro called PROGMEM which conditionally expands to nothing or to __progmem__. Perhaps there is a header file which defines __progmem__. – Kaz Aug 30 '13 at 6:30
• Did you have a link to the LCD library you can post? As Kaz said you can probably remove it but in this case you'll need to add a datatype as well, possibly something like void or uint8_t would do depending on how the library is written. – PeterJ Aug 30 '13 at 6:58
• Yes, there is a header file for that: <avr/pgmspace.h>. It looks like PGM_P is the data type you are looking for. – JimmyB Aug 30 '13 at 8:42