Problème compilation - path
Le
marcpirat
salut
je tente de compiler un programme en c
<code>tmp@linux:~/sixnet/oem_iodb> powerpc-linux-gcc oem_iodb.c
-lsxiodb -lsxio -o oem_iodb</code>
j'obtient alors
<code>oem_iodb.c:14: No include path in which to find stdio.h
oem_iodb.c:15: No include path in which to find stdlib.h
oem_iodb.c:16: No include path in which to find unistd.h
oem_iodb.c:17: No include path in which to find oemdefs.h
oem_iodb.c:18: No include path in which to find iodb.h</code>
un locate stdio.h donne
<code>/home/tmp/sixnet/powerpc-linux/include/bits/stdio.h
/home/tmp/sixnet/powerpc-linux/include/stdio.h
/usr/include/bits/stdio.h
/usr/include/stdio.h</code>
un echo path me donne:
<code>tmp@linux:~/sixnet/oem_iodb> echo $PATH
/home/tmp/sixnet/bin:/usr/lib/j2sdk1.4.2_03/bin:/home/tmp:/usr/lib/j2sdk1.4.2_03/bin:/home/tmp:/usr/lib/j2sdk1.4.2_03/bin:/home/tmp:/home/tmp/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin:/home/tmp/bin:./:/home/tmp/bin:./:/home/tmp/bin:./</code>
mon fichier .bashrc ressemble à:
<code>export PATH=$HOME/sixnet/bin:/usr/lib/j2sdk1.4.2_03/bin:$HOME:$PATH:$HOME/bin:./
export JAVA_HOME=/usr/lib/j2sdk1.4.2_03
export CLASSPATH=/usr/lib/j2sdk1.4.2_03:$HOME/bench/java</code>
donc je ne comprend pas pourquoi il me trouve pas ces fichiers ils
sont pourtant dans sixnet
une idée?
je tente de compiler un programme en c
<code>tmp@linux:~/sixnet/oem_iodb> powerpc-linux-gcc oem_iodb.c
-lsxiodb -lsxio -o oem_iodb</code>
j'obtient alors
<code>oem_iodb.c:14: No include path in which to find stdio.h
oem_iodb.c:15: No include path in which to find stdlib.h
oem_iodb.c:16: No include path in which to find unistd.h
oem_iodb.c:17: No include path in which to find oemdefs.h
oem_iodb.c:18: No include path in which to find iodb.h</code>
un locate stdio.h donne
<code>/home/tmp/sixnet/powerpc-linux/include/bits/stdio.h
/home/tmp/sixnet/powerpc-linux/include/stdio.h
/usr/include/bits/stdio.h
/usr/include/stdio.h</code>
un echo path me donne:
<code>tmp@linux:~/sixnet/oem_iodb> echo $PATH
/home/tmp/sixnet/bin:/usr/lib/j2sdk1.4.2_03/bin:/home/tmp:/usr/lib/j2sdk1.4.2_03/bin:/home/tmp:/usr/lib/j2sdk1.4.2_03/bin:/home/tmp:/home/tmp/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin:/home/tmp/bin:./:/home/tmp/bin:./:/home/tmp/bin:./</code>
mon fichier .bashrc ressemble à:
<code>export PATH=$HOME/sixnet/bin:/usr/lib/j2sdk1.4.2_03/bin:$HOME:$PATH:$HOME/bin:./
export JAVA_HOME=/usr/lib/j2sdk1.4.2_03
export CLASSPATH=/usr/lib/j2sdk1.4.2_03:$HOME/bench/java</code>
donc je ne comprend pas pourquoi il me trouve pas ces fichiers ils
sont pourtant dans sixnet
une idée?

Poser une question


Salut
[snip]
gcc permet de déclarer un répertoire d'en-têtes à inclure avec
-I/chemin/vers/le/dossier (sans espace après le -I).
Rien à voir avec le PATH (HC ici) qui détermine le chemin d'un fichier
(par exemple : ls est trouvé dans /bin/ls sur mon système).