Recherche de bibliotéque

Bonjour,j'ai compiler mon programme mais le message qu'il m'affiche:/tmp/cczoJ2ml.o: In function `main':
exo.c:(.text+0xad): undefined reference to `sqrt'
collect2: ld returned 1 exit status
hors j'ai bien dans l'entéte ceci: #include <math.h>.
je veux une aide.merci
Configuration: Linux / Firefox

1 réponse

  • Votes
  • Date
  • Date décroissante
  1. Bonjour,
    Pour linker avec la lib math, il faut ajouter "-lm" dans la commande de compilation GNU.
    1. merci ça marche avec -lm.cependant comment faire la comparison between pointer and integer?un exemple svp