Probleme compilation des prog c sous ubuntu
barça forever
-
barça forever -
barça forever -
Bonjour,
j'ai écrit un programme c tp.c dans un repertoire choisi,puis au terminal j'ai écrit un programme shell qui compile le programme tp.c est crée le fichier éxecutable et le fichier objet.
mais il me donne des erreurs
voici mon programme en shell:
#bin/bash
gcc -wall -o tp6.o -c tp6.c
gcc -o tp6 -ls tp6.o
./tp6
et il me donne les erreurs suivantes :
tp6.c:1:18: erreur: stdio.h : Aucun fichier ou répertoire de ce type
tp6.c: In function ‘main’:
tp6.c:6: attention : incompatible implicit declaration of built-in function ‘printf’
tp6.c:7: attention : incompatible implicit declaration of built-in function ‘scanf’
tp6.c:10: attention : incompatible implicit declaration of built-in function ‘printf’
gcc: tp6.o : Aucun fichier ou répertoire de ce type
compil: 4: tp6: not found
aidez moi svp
j'ai écrit un programme c tp.c dans un repertoire choisi,puis au terminal j'ai écrit un programme shell qui compile le programme tp.c est crée le fichier éxecutable et le fichier objet.
mais il me donne des erreurs
voici mon programme en shell:
#bin/bash
gcc -wall -o tp6.o -c tp6.c
gcc -o tp6 -ls tp6.o
./tp6
et il me donne les erreurs suivantes :
tp6.c:1:18: erreur: stdio.h : Aucun fichier ou répertoire de ce type
tp6.c: In function ‘main’:
tp6.c:6: attention : incompatible implicit declaration of built-in function ‘printf’
tp6.c:7: attention : incompatible implicit declaration of built-in function ‘scanf’
tp6.c:10: attention : incompatible implicit declaration of built-in function ‘printf’
gcc: tp6.o : Aucun fichier ou répertoire de ce type
compil: 4: tp6: not found
aidez moi svp
A voir également:
- Probleme compilation des prog c sous ubuntu
- Ubuntu 32 bits - Télécharger - Systèmes d'exploitation
- Robot prog - Télécharger - Édition & Programmation
- Ubuntu portable - Télécharger - Systèmes d'exploitation
- Linux mint ou ubuntu - Guide
- Ubuntu 24.04 - Accueil - Ubuntu
3 réponses
Re,
Ton script shell doit avoir un nom. C'est quoi le nom de ton script shell?
Dans quel répertoire se trouve ton script shell?
Dans quel répertoire se trouve ton fichier tp6.c ?
Ton script shell doit avoir un nom. C'est quoi le nom de ton script shell?
Dans quel répertoire se trouve ton script shell?
Dans quel répertoire se trouve ton fichier tp6.c ?
mais il m'a affiché d'autres erreurs :
gcc: tp6.c : Aucun fichier ou répertoire de ce type
gcc: pas de fichier à l'entrée
gcc: tp6.o : Aucun fichier ou répertoire de ce type
gcc: pas de fichier à l'entrée
compil: 4: ./tp6: Permission denied