Compiler un fichier de base en C sur fedora
jojo
-
lami20j Messages postés 21331 Date d'inscription Statut Modérateur, Contributeur sécurité Dernière intervention -
lami20j Messages postés 21331 Date d'inscription Statut Modérateur, Contributeur sécurité Dernière intervention -
Bonjour,
je n'arrive plus à compiler un petit fichier test.c constitué d'un seul printf.
j'ai pourtant installer le gcc sur ma fedora et voilà ce que ça me retourne:
[membre_sacer@localhost noeud]$ gcc test -o test.c
test: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.text+0x0): first defined here
test:(.rodata+0x0): multiple definition of `_fp_hw'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.rodata+0x0): first defined here
test: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crti.o:(.fini+0x0): first defined here
test:(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.rodata.cst4+0x0): first defined here
test: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.data+0x0): first defined here
test:(.rodata+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/i386-redhat-linux/4.3.0/crtbegin.o:(.rodata+0x0): first defined here
test: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crti.o:(.init+0x0): first defined here
/usr/lib/gcc/i386-redhat-linux/4.3.0/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
test:(.dtors+0x4): first defined here
/usr/bin/ld: warning: Cannot create .eh_frame_hdr section, --eh-frame-hdr ignored.
/usr/bin/ld: error in test(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
on ne sait jamais peut-être que qq à la solution.
je n'arrive plus à compiler un petit fichier test.c constitué d'un seul printf.
j'ai pourtant installer le gcc sur ma fedora et voilà ce que ça me retourne:
[membre_sacer@localhost noeud]$ gcc test -o test.c
test: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.text+0x0): first defined here
test:(.rodata+0x0): multiple definition of `_fp_hw'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.rodata+0x0): first defined here
test: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crti.o:(.fini+0x0): first defined here
test:(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.rodata.cst4+0x0): first defined here
test: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o:(.data+0x0): first defined here
test:(.rodata+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/i386-redhat-linux/4.3.0/crtbegin.o:(.rodata+0x0): first defined here
test: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crti.o:(.init+0x0): first defined here
/usr/lib/gcc/i386-redhat-linux/4.3.0/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
test:(.dtors+0x4): first defined here
/usr/bin/ld: warning: Cannot create .eh_frame_hdr section, --eh-frame-hdr ignored.
/usr/bin/ld: error in test(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
on ne sait jamais peut-être que qq à la solution.
A voir également:
- Compiler un fichier de base en C sur fedora
- Fichier bin - Guide
- Comment réduire la taille d'un fichier - Guide
- Comment ouvrir un fichier epub ? - Guide
- Fichier rar - Guide
- Fichier .dat - Guide
4 réponses
Salut,
au début de ton fichier as-tu mis #include <stdio.h> ?
si oui, alors je pense que le fichier n'existe pas
en ce cas tu dois installer la libraire libc developpement (sous debian c'est libc6-dev)
au début de ton fichier as-tu mis #include <stdio.h> ?
si oui, alors je pense que le fichier n'existe pas
en ce cas tu dois installer la libraire libc developpement (sous debian c'est libc6-dev)
en fait pour dire vrai, il m'efface le fichier à chaque fois que je compile gcc test -o test.c .
je dois remettre une copie dans mon dossier.
je pense que la libc se trouve dans ce paquet:
[root@localhost noeud]# yum install glibc
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package glibc-2.8-1.i686 already installed and latest version
Nothing to do
[root@localhost noeud]#
je dois remettre une copie dans mon dossier.
je pense que la libc se trouve dans ce paquet:
[root@localhost noeud]# yum install glibc
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package glibc-2.8-1.i686 already installed and latest version
Nothing to do
[root@localhost noeud]#
d'autant plus que hier ça marché très bien!!!!
#include <stdio.h>
#include <stdlib.h>
int main(){
printf("test \n");
return 0;
}