compiler error:"object_name" does not name a type when using a library..

Hi Users,
I hope someone could help me, when i add a library and implement it (I'm quite sure I do it proper) and I want to define a new object I get this error while compiling.

[quote]
#include <[color=#CC6600]SPI[/color].h>

#include <MFRC522.h>

#define SS_PIN 10

#define RST_PIN 5

MFRC522 mfrc522(SS_PIN, RST_PIN);

 

[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]() 

{

[color=#CC6600][b]Serial[/b][/color].[color=#CC6600]begin[/color](9600);

[color=#CC6600]SPI[/color].[color=#CC6600]begin[/color]();

mfrc522.PCD_Init();

[color=#CC6600]pinMode[/color] (2, [color=#006699]OUTPUT[/color]);

}

 

[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]() 

{

[color=#CC6600]if[/color] ( ! mfrc522.PICC_IsNewCardPresent()) 

{

[color=#CC6600]return[/color];

}

 

[color=#CC6600]if[/color] ( ! mfrc522.PICC_ReadCardSerial())

{

[color=#CC6600]return[/color];

}

 

[color=#CC6600]long[/color] code=0;

[color=#CC6600]for[/color] ([color=#CC6600]byte[/color] i = 0; i < mfrc522.uid.[color=#CC6600]size[/color]; i++) 

 

 

{

code=((code+mfrc522.uid.uidByte[i])*10);

} 

 

 

 

 

[color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]([color=#006699]"Die Kartennummer lautet:"[/color]);

[color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color](code);

 

[color=#CC6600]if[/color] (code==1031720)

{

[color=#CC6600]digitalWrite[/color] (2, [color=#006699]HIGH[/color]);

[color=#CC6600]delay[/color] (5000);

[color=#CC6600]digitalWrite[/color] (2, [color=#006699]LOW[/color]);

}

 

}

[/quote]

'MFRC522' does not Name a type

I' ve already searched the Internet but it seems that nobody had this issue before.I don't know what to do because it already happend twice (with arduino nano and uno, code from the Internet).
Pls help me, as I don't know any further,
Thanks in advance,
NearCZ from Germany

When the compiler sees this line: MFRC522 mfrc522(SS_PIN, RST_PIN);
the compiler scratches its head, because it doesn't know what "MRFC522" is.
It means that either the MFRC522.h file can not be found, or the library can not be found.

Did you import that library ? Are you sure ?
The libraries are in the folder "libraries" next to your own project files with sketches. That folder is set in the settings. Can you try to find the folder "libraries" and see if the MFRC522 is there ?