• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst] math.h in C will nicht

Hallo,

ich benutze openSUSE 10.2 und habe mir gcc installiert um in C zu programmieren.
Das hat bisher auch gut funktioniert aber Funktionen aus der math-Bibliothek kann ich nicht benutzen.

Wenn ich folgendes Programm
Code:
#include <stdio.h>
#include <math.h>

int main ()
{
  double a,b;
 
  a = 3.0;
  b = sin(a);
} /* End Happy*/
mit
Code:
make happy
kompilieren will, kommt folgende Fehlermeldung
Code:
cc     happy.c   -o happy
/tmp/cc4WtUww.o: In function `main':
happy.c:(.text+0x21): undefined reference to `sin'
collect2: ld returned 1 exit status
make: *** [happy] Fehler 1

math.h ist sicher in /usr/include vorhanden.
Wo ist da der Wurm drin?

MfG
MKa
 
Oben