Well, your example worked! (but I have not read the gcc manual, and don't know what options I feed..) My first case looked like this:-Ehe it's to long. But the same happened if I compile your testcase with only: "cc main.c"
It will output: [ /tmp/ccywC279.o(.text+0x24): In function `main': : undefined reference to `pow' collect2: ld returned 1 exit status ] Jeff Bailey wrote:
On Thu, Feb 05, 2004 at 08:26:46PM +0100, Per Blomqvist wrote:function 'pow' are suppose to be in the 'math.h' according the "C Library manual" glibc-doc.. :Here's my testcase: $ cat main.c #include <stdio.h> #include <math.h>intmain () { printf("%f\n", pow(2, 3)); return(0); } $ gcc -O2 -Wall -W main.c -lm $ ./a.out 8.000000 So it works for me. Please provide a testcase showing your problem. Tks, Jeff Bailey