News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

include files not found!

Started by jmv, July 10, 2010, 07:20:20 PM

Previous topic - Next topic

jmv

i am sorry to post for help on this subject but i am lost!
i have setup the path for the include files in:
- project->build options->search directories->compiler for the project, debug and release
- settings->compiler and debugger->search directories->compiler
- i have check that my incude files are world readable
however #include   <avr\io.h>     and likes gives me an error kind file not found
i don't see what i could do to solve the problem
please, help me

killerbot

could you tell :
- the full path of that "io.h"
- the path of the search directory you have added
- where you cbp file is of the project you are working on

jmv

- the full path of that "io.h"
- the path of the search directory you have added
- where you cbp file is of the project you are working on

yes, indeed:
- /opt/cdk4avr/avr/include/avr/io.h
- i have tried these without success: /opt/cdk4avr/avr and /opt/cdk4avr/avr/include
- the cbp of my project is: /home/jmv/projets/atmega/myavr-lcd/myavr-lcd.cbp
thank you very much for your help and your quick answer

killerbot

/opt/cdk4avr/avr/include   is what you need.

But try to change the include in your code to :
#include  <avr/io.h>

Note the forward slash.

jmv

<avr/io.h> was alwaysdeclared this way
i have forgotten to say that i work not with windows but with linux, mandriva 2010
thank you for your help
i am fully puzzeld with this issue :(

killerbot

go to compiler settings -> other settings tab, and put Compiler logging to full command line, and post the output of your failed build here.

jmv

please, find the answer below, but i have made some tests and modified the position of the include directory now: /opt/cdk4avr/include to have bin and include directories at the same level; /usr/cdk4avr is a try but is removed from the settings project and general, i don't understand why it appears here;  "Aucun fichier ou dossier de ce type" means "no file or dir of this type", sorry i am french :D, nobody is perfect   ;-))

Build started on: 10-07-2010 at 23:01.47
Build ended on: 10-07-2010 at 23:01.47

-------------- Build: Debug in myavr-lcd ---------------
avr-gcc -mmcu=atmega168 -Wall -DF_CPU=20000000UL -mmcu=atmega168 -Wall -msize -mmcu=atmega168 -Wall -Werror -I/usr/cdk4avr -I/datas/microprocs/atmel/myAVR/lcd16x2 -I/usr/cdk4avr -I/datas/microprocs/atmel/myAVR/lcd16x2 -I/opt/cdk4avr -c main.c -o obj/Debug/main.o
main.c:2:81: avr\io.h : Aucun fichier ou dossier de ce type
main.c:3:79: util\delay.h : Aucun fichier ou dossier de ce type
main.c:4:85: avr\interrupt.h : Aucun fichier ou dossier de ce type
main.c: In function `initialisation':
main.c:16: erreur: « DDRB » non déclaré (première utilisation dans cette fonction)
main.c:16: erreur: (Chaque identificateur non déclaré est rapporté une seule fois
main.c:16: erreur: pour chaque fonction dans laquelle il apparaît.)
main.c:17: erreur: « PORTB » non déclaré (première utilisation dans cette fonction)
main.c:19: erreur: « DDRC » non déclaré (première utilisation dans cette fonction)
main.c:20: erreur: « PORTC » non déclaré (première utilisation dans cette fonction)
main.c:24: erreur: « TCNT1 » non déclaré (première utilisation dans cette fonction)
main.c:25: erreur: « TIMSK » non déclaré (première utilisation dans cette fonction)
main.c:26: erreur: « TCCR1B » non déclaré (première utilisation dans cette fonction)
main.c:30: attention : déclaration implicite de la fonction « sei »
main.c: In function `main':
main.c:55: erreur: « reveil_declenche » non déclaré (première utilisation dans cette fonction)
main.c:56: erreur: « alarme_active » non déclaré (première utilisation dans cette fonction)
main.c:60: erreur: « TCCR2 » non déclaré (première utilisation dans cette fonction)
main.c:77: erreur: « PORTC » non déclaré (première utilisation dans cette fonction)
main.c: At top level:
main.c:95: attention : le type du retour est « int » par défaut
main.c:102: attention : le type du retour est « int » par défaut
main.c:102: erreur: redéfinition de « ISR »
main.c:95: erreur: définition précédente de « ISR » était ici
Process terminated with status 1 (0 minutes, 0 seconds)
21 errors, 0 warnings

jmv

i have made the same run but with -I/opt/cdk4avr/include: same answer

killerbot

#8
but you are not using : /opt/cdk4avr/avr/include

and you said the io.h was at /opt/cdk4avr/avr/include/avr/io.h

EDIT : check very carefully your paths, because these things do work.

jmv

thanks for your answer but i am afraid you did not read the first lines of my message: my paths are good because i have modified some things trying to find some clue  :-)

jmv

i add: now, io.h path is /opt/cdk4avr/include/avr and /opt/cdk4avr/avr does not exist.

jmv

SOLVED!
i apologize for having not carefully checked your answer: in the source, the / was a \ because i copied the source from a windows source  :-(
i am very sorry of that and i think it's time to go to bed!
Many thanks for your help.