Le Vendredi 31 Janvier 2003 22:33, LEFEBVRE Herve a �crit :
> On Vendredi 31 Janvier 2003 21:45, B. Telgeuse wrote:
> > Il m'arrive un truc pas banal. Ayant besoin d'�crire un programme C
> > utilisant, entre autres, des fonctions math�matiques, j'inclue le fichier
> > "math.h" qui doit me donner acc�s � la bibblioth�que ANSI de fonctions
> > math�matiques et ... rien,nada: Le compilateur ne trouve aucune des
> > fonctions math�matiques invoqu�es dans le programme (sin,cos,log, etc
> > ...). K�zaco ?
>
> Tu fais koi comme include ?

>>> #include <math.h>

> Le compilateur renvoie koi comme erreur ?

>>> Pardon, le compilateur est OK. C'est le linker qui n'est pas content: 
Ci-joint la sortie du bazar :

*** succ�s *** 
gmake all-recursive 
gmake[1]: Entre dans le r�pertoire `/home/tonio/D�veloppement/trigo' 
Making all in trigo 
gmake[2]: Entre dans le r�pertoire `/home/tonio/D�veloppement/trigo/trigo' 
gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -c main.c 
/bin/sh ../libtool --mode=link gcc -O2 -O0 -g3 -Wall -o trigo main.o 
mkdir .libs 
gcc -O2 -O0 -g3 -Wall -o trigo main.o 
main.o: In function `main': 
/home/tonio/D�veloppement/trigo/trigo/main.c:37: undefined reference to `sin' 
/home/tonio/D�veloppement/trigo/trigo/main.c:38: undefined reference to `cos' 
collect2: ld returned 1 exit status 
gmake[2]: *** [trigo] Erreur 1 
gmake[2]: Quitte le r�pertoire `/home/tonio/D�veloppement/trigo/trigo' 
gmake[1]: *** [all-recursive] Erreur 1 
gmake[1]: Quitte le r�pertoire `/home/tonio/D�veloppement/trigo' 
gmake: *** [all-recursive-am] Erreur 2 
*** �chec *** 

Vous souhaitez acquerir votre Pack ou des Services MandrakeSoft?
Rendez-vous sur "http://www.mandrakestore.com";

Répondre à