Can't compile IRemote header in Atmel studio 7

Hi My friends

I’m newbie with AVR U Controllers and I’m have Arduino uno and an AVR UController ATMEGA8A and using Atmel studio 7 for my code,

I’ve built IR remote control receiver with arduino uno with the help of IR library and it works very fine,

but also i want to build the same project with ATMEGA8A and using arduino library (IRRemote.h) that i’ve used befor

, so when i compile the program with the name main.c ,I’ve got a tons of error and after googling the issue i have renamed the “main.c” to “main.cpp” and compiled the app I’ve stuck with two errors

Error recipe for target ‘RemoteCtrl.elf’ failed RemoteCtrl E:\Projects\ATMEL UController\RemoteCtrl\Debug\Makefile 96 Build
Error ld returned 1 exit status RemoteCtrl collect2.exe 0 Build

Pls if any one can help :cry: :cry: :cry:

My Code

#define recvPin 0
#define outPutPin1 1
#define outPutOin2 2

#include "IRHeaders/IRremote.h"

int main(void)

		DDRC=0b00000110;     //DDRC=(1<<2|1<<1|1<<0);
		IRrecv irrRecv(recvPin);
		decode_results results;

	while (1)
     if(irrRecv.decode(&results) )
	       case 0xFD00FF:
	   // the required action 1

	       case 0xFD807F:

	       //  the required action 2

Hey My Friends

any body there.