[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] Simple Math Problem.
- Subject: [cobalt-developers] Simple Math Problem.
- From: Remy Baker <rbaker@xxxxxxxxxxxxx>
- Date: Wed Jun 7 15:15:47 2000
Ok, this is should be a really simple question for someone on the list.
I am trying to port some programs from DOS to my RaQ2, everything was going
along great until I ran into a program that calls some pretty basic math
functions. Whenever I try accessing any of the math.h functions (sqrt, log,
etc) I get the following error:
$ gcc mathtest.c
/tmp/cca308401.o: In function `main':
mathtest.c(.text+0x48): undefined reference to `sqrt'
collect2: ld returned 1 exit status
$
The above program (mathtest.c) looks like this (pretty simple eh?):
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
main()
{
double z, y=100.0;
z = sqrt(y);
exit(0);
}
Am I missing something here? Any clues or answers to this problem would be
greatly appreciated!
~Remy