gcc's(4.4.3) math lib :power

2010-10-29 Thread eric lin
dear gcc programers: I tried to use math lib's power by the following simple code (actually I copy from http://www.java2s.com/Code/C/Math/Howtousepow.htm that site show this code should run, but I get compiler error about not define pow, please help, Eric, in 4.4.3 -

Re: gcc's(4.4.3) math lib :power

2010-10-29 Thread Paolo Carlini
that site show this code should run, but I get compiler error Actually you get a *linker* (ie, ld) error. Try adding -lm to the command line. Paolo Ps: in the future please prefer gcc-help...