----------------------------------
E-Mail: Larry Mintz <[EMAIL PROTECTED]>
Date: 09-Mar-00
Time: 23:07:29


I having trouble with linking libraries

say I have a program called foo.c
#include <stdio.h>
#include<math.h>

main()
{
int i;
float j;
for(i=1;i<100;++i)
j=sin(1.0*i,pow(1.0*i,2));
}
When creating the executable 
gcc -o foo foo.c  or egcs -o foo foo.c

I got the following errors
/tmp/ccDfH7Hu.o   main:
/tmp/ccDfH7Hu.o(.text+0x22):undefined reference to 'sin'
/tmp/ccDfH7Hu.o(.text+0x22):undefined reference to 'pow'

How can I fix this problem ? When I use g++ things work fine.
Larry<[EMAIL PROTECTED]>

This message was sent by XFMail
----------------------------------


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to