# Can't compile IRemote header in Atmel studio 7

**URL:** <https://community.sparkfun.com/t/cant-compile-iremote-header-in-atmel-studio-7/35876>\
**Category:** MicroMod\
**Tags:** avr-atmel\
**Created:** [September 25, 2018, 11:18pm UTC](https://community.sparkfun.com/t/cant-compile-iremote-header-in-atmel-studio-7/35876 "2018-09-25T23:18:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheNightWhisper](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@TheNightWhisper](https://community.sparkfun.com/u/TheNightWhisper)\
**Post date:** [September 25, 2018, 11:18pm UTC](https://community.sparkfun.com/t/cant-compile-iremote-header-in-atmel-studio-7/35876/1 "2018-09-25T23:18:18Z")

</div>

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 😢 😢 😢

My Code

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

#include
#include
#include "IRHeaders/IRremote.h"

int main(void)
{

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

	while (1)
    {
     if(irrRecv.decode(&results) )
	 {
		switch(results.value)
		{
	       case 0xFD00FF:
	   // the required action 1
	       break;

	       case 0xFD807F:

	       // the required action 2
	       break;
		}
		irrRecv.resume();
	 }
	}
}

```

---

<div class="post-metadata">

**Author:** ![TheNightWhisper](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@TheNightWhisper](https://community.sparkfun.com/u/TheNightWhisper)\
**Post date:** [September 27, 2018, 9:02pm UTC](https://community.sparkfun.com/t/cant-compile-iremote-header-in-atmel-studio-7/35876/2 "2018-09-27T21:02:43Z")

</div>

Hey My Friends

any body there.
