user1106072
user1106072

Reputation: 331

ifndef issue, Warning[Pe014]: extra text after expected end of preprocessing directive

#ifndef LCD.h
#define LCD.h
extern unsigned char LCDDISPLAY[][64];
void write(int x_start, int y_start, char text[]);
#endif // #ifndef LCD.h

Error message:

Warning[Pe014]: extra text after expected end of preprocessing directive

Upvotes: 1

Views: 9388

Answers (3)

Mihai Maruseac
Mihai Maruseac

Reputation: 21435

Change the first lines to

#ifndef LCD_H
#define LCD_H

Since you cannot use . in #if.. macros you'll replace it with an _ (of course, this is only one way)

Upvotes: 2

Michael Krelin - hacker
Michael Krelin - hacker

Reputation: 143051

You don't normally use dots in identifiers.

Upvotes: 3

sidyll
sidyll

Reputation: 59277

The defined name must be a regular identifier, containing only a-z, underscore and 0-9 characters but not beginning with a number. In

#define LCD.h

LCD is considered to be the "identifier", and the rest of it is junk text (hence the extra text warning).

Upvotes: 3

Related Questions