What happened to "round" and "pow" functions?
About eleven years ago I wrote several small financial programs in C.
Today I went to modify them. When I tried to compile, I got the messages "Undefined reference to 'pow'" and "Undefined reference to 'round'". According to the manual, these are defined in math.h. Couldn't find them there and searches through /usr/include were indefinite at best. Using gcc-4.4. TIA, John |
Did you remember to link against the math library, i.e. use -lm linker option?
|
Try using the -lm linker flag when you compile it.
Cheers, Josh |
Thanks. The problem was not using C for too many years.
John |
Operater error, huh? :D
|
All times are GMT -5. The time now is 05:34 PM. |