home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!plains!grisanti@plains.NoDak.edu
- From: grisanti@plains.NoDak.edu (Ames Grisanti)
- Newsgroups: comp.os.linux
- Subject: Need help with math functions in GCC 2.2.2
- Message-ID: <19319@plains.NoDak.edu>
- Date: 24 Jul 92 05:28:35 GMT
- Article-I.D.: plains.19319
- Organization: University of North Dakota EERC
- Lines: 35
-
- 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
-