Chat on IRC |
Error(s) with gcc
Posted by vladimir_l [send private reply] at April 21, 2002, 03:08:56 PM
I had not really used math.h that often until I needed some cos() and sin() , when I included it gcc came up with stupid errors. That made made me think and I wnat to know how to solve this problem.It was a simple program I wrote to help me with my Russian physics work , to do with 'optika'. Thanks ....
Posted by Psion [send private reply] at April 21, 2002, 04:40:37 PM
Do you have a question?
Posted by unknown_lamer [send private reply] at April 21, 2002, 08:12:47 PM
You need to add -lm to the command line of gcc when linking because the math library (libm) is separate from the libc. That should fix all of your problems (which I am betting are linker errors).
Posted by vladimir_l [send private reply] at April 23, 2002, 06:28:03 AM
Thanks...
Register as a new user | ||||||