Author Topic: include files not found!  (Read 14816 times)

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
include files not found!
« on: July 10, 2010, 07:20:20 pm »
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

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5296
Re: include files not found!
« Reply #1 on: July 10, 2010, 07:22:09 pm »
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

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #2 on: July 10, 2010, 09:31:40 pm »
- 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

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5296
Re: include files not found!
« Reply #3 on: July 10, 2010, 09:46:30 pm »
/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.

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #4 on: July 10, 2010, 09:58:08 pm »
<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 :(

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5296
Re: include files not found!
« Reply #5 on: July 10, 2010, 10:23:58 pm »
go to compiler settings -> other settings tab, and put Compiler logging to full command line, and post the output of your failed build here.

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #6 on: July 10, 2010, 11:12:18 pm »
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

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #7 on: July 10, 2010, 11:15:14 pm »
i have made the same run but with -I/opt/cdk4avr/include: same answer

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5296
Re: include files not found!
« Reply #8 on: July 10, 2010, 11:19:18 pm »
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.
« Last Edit: July 10, 2010, 11:27:43 pm by killerbot »

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #9 on: July 10, 2010, 11:32:22 pm »
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  :-)

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #10 on: July 10, 2010, 11:34:51 pm »
i add: now, io.h path is /opt/cdk4avr/include/avr and /opt/cdk4avr/avr does not exist.

Offline jmv

  • Single posting newcomer
  • *
  • Posts: 9
Re: include files not found!
« Reply #11 on: July 10, 2010, 11:53:18 pm »
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.