sin( ) and math.h : Insanity!

sin( ) and math.h : Insanity!

Post by Frank Fishe » Sun, 19 Nov 2000 04:00:00



Well, here's my problem:
   For a Physics project, I'm writing a program to model motion.  Everything
was going well until I got to the force_affect( ) func.  Basically, the
formulae I have to use use trigonometric functions, and though I've read
manual pages, I get undefined reference errors from the linker.  
   My guess would be that there's a library I have to use a special library?
Any help or suggestions would be appreciated, Thank you

- Frank Fisher

 
 
 

sin( ) and math.h : Insanity!

Post by Peter Roozemaa » Sun, 19 Nov 2000 04:00:00



> Well, here's my problem:
>    For a Physics project, I'm writing a program to model motion.  Everything
> was going well until I got to the force_affect( ) func.  Basically, the
> formulae I have to use use trigonometric functions, and though I've read
> manual pages, I get undefined reference errors from the linker.
>    My guess would be that there's a library I have to use a special library?
> Any help or suggestions would be appreciated, Thank you

Is this in the FAQ?

There is a seperate library for the functions in <math.h>; link with -lm

Peter

 
 
 

1. Trouble finding C's math functions: log10(), sin, etc...

Do you know where I can get the C runtime library math functions?
I'm writing a C program and I want to call log10().  When I compile,
the error I get is "... undefined symbol _log10()..."

Using: SLS 1.0
Kernel: 1.55
GCC: Version 2.5.8
LibC: Versions 4.5.pl25 (I think)

Any help appreciated.

Greg

2. Looking for Linux compatible server hardware

3. undefined reference to sin (and math.h)

4. redhat 5.0 install

5. Matrox Mystique ands X.

6. X and Win95 conflict (?)

7. KPM for KDE3 insanity (SuSE)

8. FP2000 / Apache 1.3.9 -- WORKGROUP functionality???

9. Networking problem, approaching insanity rapidly

10. minicom beep hangs <recipe for insanity>

11. Help me Avoid Insanity ... :-(

12. Insanity on a cd

13. SCO Multiprocessor Oracle 7 Insanity Test