c - mathlib
sers @all
ich möchte unter linux in c die mathlib nutzen und schrieb folgendes kleines prog, daß unter visual c++ funzt:
-----------------cut--------------------
#include <stdio.h>
#include <math.h>
int main(int argc, char **argv)
{
int iwerte[100];
int i;
iwerte[0]=0;
for(i=0; i<100; iwerte[i]= pow(++i,2));
for(i=0; i<100; printf("%d\t%d\n", i, iwerte[++i]));
return 0;
}
----------------------cut----------------
beim versuch mit dem gcc, daß ganze zu compilieren erhalte ich folgende fehlermeldung:
/tmp/ccVaXske.o: In function `main':
/tmp/ccVaXske.o(.text+0x4f): undefined reference to `pow'
collect2: ld returned 1 exit status
öhm ... wie kann das?
für hilfe im voraus ein thx.
greetz
artemisia
|