| Author |
Message |
|
|
Posted: Jun 07, 2011 - 08:30 PM |
|


Joined: Mar 21, 2011
Posts: 66
|
|
| I got this silly question since I am new to AVR Studio please clarify my doubts,How do I include header files into AVR Studio 5? |
|
|
| |
|
|
|
|
|
Posted: Jun 07, 2011 - 08:42 PM |
|


Joined: Jul 18, 2005
Posts: 62245
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Code:
#include
perhaps? |
_________________
|
| |
|
|
|
|
|
Posted: Jun 07, 2011 - 09:20 PM |
|


Joined: Mar 21, 2011
Posts: 66
|
|
| no I means that If I a have written a program in c and and another user built header is to be included into the project file ,then what procedure is to be followed!!! |
_________________ AkA GodFather
|
| |
|
|
|
|
|
Posted: Jun 07, 2011 - 09:36 PM |
|


Joined: Mar 01, 2001
Posts: 4953
Location: Rocky Mountains
|
|
#include "other_header_file.h"
And then make sure the compiler knows where to find "other_header_file.h". |
_________________ Eric Weddington
Marketing Manager
Open Source & Community
Atmel
|
| |
|
|
|
|
|
Posted: Jun 07, 2011 - 09:46 PM |
|

Joined: Nov 28, 2004
Posts: 3552
Location: San Diego, Ca
|
|
|
EW wrote:
#include "other_header_file.h"
And then make sure the compiler knows where to find "other_header_file.h".
One way of doing that is to put a COPY of it into the pjt. folder. See my tutorial for another. The method should apply to the AS5 IDE too. |
_________________ 1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1
|
| |
|
|
|
|
|
Posted: Jun 08, 2011 - 07:01 AM |
|


Joined: Mar 21, 2011
Posts: 66
|
|
Thank you,Its working!  |
_________________ AkA GodFather
|
| |
|
|
|
|
|
Posted: Jun 08, 2011 - 07:09 AM |
|


Joined: Mar 21, 2011
Posts: 66
|
|
| I got another question That I bought an robokits avr development board based on avr atmega32,They supplied some example codes with it but I was wondering that the lcd.h header file is equipped with an lcd.c file and a main file so what is the lcd.c file. when I execute the pogram the compiler shows error "undefined reference lcd_init , lcd_puts" |
_________________ AkA GodFather
|
| |
|
|
|
|
|
Posted: Jun 08, 2011 - 07:17 AM |
|


Joined: Jan 14, 2008
Posts: 1147
Location: San Diego
|
|
|
Ashkar_Malik wrote:
I got another question That I bought an robokits avr development board based on avr atmega32,They supplied some example codes with it but I was wondering that the lcd.h header file is equipped with an lcd.c file and a main file so what is the lcd.c file. when I execute the pogram the compiler shows error "undefined reference lcd_init , lcd_puts"
You need to compile (and link) lcd.c along with the main file. |
_________________ ~~John
TWI C source code
|
| |
|
|
|
|
|
Posted: Jun 08, 2011 - 07:55 AM |
|


Joined: Mar 21, 2011
Posts: 66
|
|
| ok thanks ,I understand that,Now the code is working. |
_________________ AkA GodFather
|
| |
|
|
|
|
|
Posted: Jun 08, 2011 - 09:24 AM |
|


Joined: Jul 18, 2005
Posts: 62245
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
One way of doing that is to put a COPY of it into the pjt. folder
I'd only do this by a soft-link, otherwise you'll end up with multiple copies which can become a source control nightmare. Far better is to learn about passing -I to the GCC compiler. |
_________________
|
| |
|
|
|
|
|