From: grisanti@plains.NoDak.edu (Ames Grisanti) Subject: Need help with math functions in GCC 2.2.2 Date: 24 Jul 1992 05:28:35 GMT
I can't get math functions to compile with GCC 2.2.2 running
under linux 0.96a. I installed GCC according to the instructions
and think it works since I was able to compile the kernel I'm
running right now. But I was attempting to compile some programs
of my own and couldn't get any math functions to work. For
example the simple program:
#include <math.h>
void main(void)
{
double x;
for(x=0; x<=100; x++)
{
printf("%f %f\n",x, sin(x));
}
}
Produces an error message complaining about undefined symbol
_sin in segment main. I am compiling with the -lm flag. What is
really strange about this is that I can compile the 0.96a kernel
with this system just fine.
Any help is greatly appreciated.
Ames Grisanti
University of North Dakota
Energy and Environmental Research Center
[grisanti@plains.NoDak.edu -- Internet]
[grisanti@plains or ndsuvax -- Bitnet ]
[uunet!plains!grisanti -- UUCP ]
"Quantum Mechanics, the dreams that stuff is made of."
-unknown